I have the following listing β
public enum SyncStatus { Unavailable = 0, Checking = 5, StartedAspNetDb = 10, FinishedAspNetDb = 20, StartedMatrixDb = 30, FinishedMatrixDb = 40, StartedConnectDb = 50, FinishedConnectDb = 60, StartedCmoDb = 70, FinishedCmoDb = 80, StartedMcpDb = 90, FinishedMcpDb = 100 }
What am I using here β
SyncInBackground.ReportProgress(SyncStatus.StartedAspNetDb); MergeRepl aspnetdbMergeRepl = new MergeRepl(SystemInformation.ComputerName + "\\SQLEXPRESS", "WWCSTAGE", "aspnetdb", "aspnetdb", "aspnetdb"); aspnetdbMergeRepl.RunDataSync(); SyncInBackground.ReportProgress(SyncStatus.FinishedAspNetDb); SyncInBackground.ReportProgress(SyncStatus.StartedMatrixDb); MergeRepl matrixMergeRepl = new MergeRepl(SystemInformation.ComputerName + "\\SQLEXPRESS", "WWCSTAGE", "MATRIX", "MATRIX", "MATRIX"); matrixMergeRepl.RunDataSync(); SyncInBackground.ReportProgress(SyncStatus.FinishedMatrixDb); SyncInBackground.ReportProgress(SyncStatus.StartedConnectDb); MergeRepl connectMergeRepl = new MergeRepl(SystemInformation.ComputerName + "\\SQLEXPRESS", "WWCSTAGE", "CONNECT", "Connect", "Connect"); connectMergeRepl.RunDataSync(); SyncInBackground.ReportProgress(SyncStatus.FinishedConnectDb);
I do not understand why, if int is default enum governing type , I need to CAST this line, also β
SyncInBackground.ReportProgress((int)SyncStatus.Checking);
Forgive my ignorance, I just like to understand why things are not just what they are.