Convert.ToInt32()次のコードを確認して、との違いを教えてください。int()なぜConvert.ToInt32エラーが表示されるのですか?
これUserTypeが列挙型です
// Showing error constant initializer must be compile time constant
const int case1 = Convert.ToInt32(UserType.Admin);
const int case2 = int(UserType.Admin);