I remember in Java, being able to do something like this...
And that would work its way down the chain of constructors so that you didn't need a lot of repeat initializing code. That may not be the completely correct syntax, but I hope you get the idea.Code:public class SomeClass { public SomeClass() { this(0); } public SomeClass(int x) { this(x,""); } public SomeClass(int x, string s) { /* ... */ } }
Anyway, this doesn't seem to work in C#. Is there any way to do something like the above in C#?
![]()




Reply With Quote