J
Jessie
Hi,
Is it possible to reference a class constructor with a delegate?
For example:
namespace testReferenceConstructorWithDelegate
{
// if I have a delegate defined like so...
delegate myClass myClassConstructorDelegate();
// and a class like this...
class myClass
{
// with this constructor...
public myClass()
{
// (some code goes here)
}
}
// how would I go about referencing the constructor of the class
using the delegate?
class testReference
{
/*
-- this doesn't appear to work --
myClassConstructorDelegate ADelegate = myClass;
-- neither does this --
myClassConstructorDelegate ADelegate = new
myClassConstructorDelegate(myClass);
*/
}
}
Is it possible to reference a class constructor with a delegate?
For example:
namespace testReferenceConstructorWithDelegate
{
// if I have a delegate defined like so...
delegate myClass myClassConstructorDelegate();
// and a class like this...
class myClass
{
// with this constructor...
public myClass()
{
// (some code goes here)
}
}
// how would I go about referencing the constructor of the class
using the delegate?
class testReference
{
/*
-- this doesn't appear to work --
myClassConstructorDelegate ADelegate = myClass;
-- neither does this --
myClassConstructorDelegate ADelegate = new
myClassConstructorDelegate(myClass);
*/
}
}