Reputation: 5180
Im trying to convert following line of VB.NET to C#:
Dim langs As New List(Of LanguageEnum)(System.Enum.GetValues(GetType(LanguageEnum)))
I ended up with the following translation, which does not work:
List<LanguageEnum> langs = new List<LanguageEnum>(System.Enum.GetValues(typeof(LanguageEnum)));
--> "The best overloaded method match {...} has some invalid arguments." Even http://www.developerfusion.com/tools/convert/vb-to-csharp/ would give me exactly this translation. What is wrong about it?
Upvotes: 3
Views: 2142