Hello Mark,
Yes in there own kind of way, you do something like this;
public class MyClass
{
public MyClass() //One of your constructors
{
//Something(s) you want this constructor to do fundamentally.. .
}
public MyClass(string param1) : this()
{
//Other things you want done but need to to or want to do other
things from the constructor above
}
public MyClass(int nAge, string param1) : this(param1)
{
//Get the picture???
}
} //class MyClass
Hope this helps you Mark go well.
SpotNet ;~?
"Mark" <mf****@idonotl ikespam.cce.umn .edu> wrote in message
news:en******** ******@TK2MSFTN GP12.phx.gbl...
public class myClass
{
public myClass(string param1)
{
//HOW DO I CALL myClass() below??
myClass(); // THIS DOES NOT WORK
}
public myClass()
{
//Do something here that ALL constructors should do. Hence, I
want to call it from
}
}
NOTE: I could just make a different method that the constructors call, but
I'd like to avoid this. Is there a way to do what I'm trying to do?
It also doesn't make sense to do "new myClass()" in the first constructor
because that just creates an entirely new instance of the class.
Thanks in advance!
Mark