Just call it like you would from anywhere else....
class Foo
{
public void SomeFunc()
{
Foo foo = new Foo();
// etc....
}
}
Unless you are retrying to restructure the object itself, inwhich case, you
don't want to call a constructor at all (the object already exists), but a
initializer:
class Foo
{
public Foo(int n, string s)
{
Set(n,s);
}
public SomeFunc()
{
Set(5, "Hello World");
}
private void Set(int n, string s)
{
// So what ever you want here.
}
}
--
Truth,
James Curran
[erstwhile VC++ MVP]
Home:
www.noveltheory.com Work:
www.njtheater.com
Blog:
www.honestillusion.com Day Job:
www.partsearch.com
"Nicolas" <(E-Mail Removed)> wrote in message
news:41d42319$0$31457$(E-Mail Removed)...
> Hi,
>
> How can one call a constructor in the same class as the constructor itself
?
>
> Thanks.