T
Tristan
Hi,
I am trying to call an overloaded constructor from within an another
one with parameters that have to be processed inside the constructor.
Therfore I can't use the Constructor() : Constructor(params) type of
syntax. I think the code below, explains better what I'm trying to do.
Class AClass
{
AClass(string fileName)
{ }
AClass(string key)
{
// Do some special processing on key to get a fileName
// Here I want to call AClass(fileName) but how!!!!
}
}
I suspect this isn't possible and I just have to define some private
method that can get called by both constructors?
Any help appreciated.
Tristan.
I am trying to call an overloaded constructor from within an another
one with parameters that have to be processed inside the constructor.
Therfore I can't use the Constructor() : Constructor(params) type of
syntax. I think the code below, explains better what I'm trying to do.
Class AClass
{
AClass(string fileName)
{ }
AClass(string key)
{
// Do some special processing on key to get a fileName
// Here I want to call AClass(fileName) but how!!!!
}
}
I suspect this isn't possible and I just have to define some private
method that can get called by both constructors?
Any help appreciated.
Tristan.