Is there any mechanism in C# that allows one to define and declare an Enum variable in the same line like so:
public class ClassWithEnumMember
{
public Enum Type { TYPE1, TYPE2, TYPE3 } = TYPE1;
}
Is there any mechanism in C# that allows one to define and declare an Enum variable in the same line like so:
public class ClassWithEnumMember
{
public Enum Type { TYPE1, TYPE2, TYPE3 } = TYPE1;
}
public enum Foo { Bar, Baz }; public Foo myField = Foo.Bar;
All neatly on one line!