So I am working with Enumerations for my first time in C# but I don't think it'll last as I just realised the lack of flexibility you have with them as you do in Java.
For example, the equivalent of what I want to do in Java would look something like this:
public enum Days {
Mon("Monday"), Tue("Tuesday"), Wed("Wednesday"), Thu("Thursday", 93), Fri, Sat("Saturday", 44), Sun;
private String longName;
private int other;
Days() {}
Days(String longName) {
this.longName = longName;
}
Day(String longName, int somethingElse) {
this(longName);
this.other = somethingElse;
}
@Override
public String toString() {
return this.longName + ", " + this.other;
}
}
Is there anyway I can do this in C#? As far as I can tell, with enums you can only do something like the following:
public enum Days { Mon=1, Tue=2, Wed=3 }
It doesn't have to strictly be an enum, just act like the Java enum.