T
Tamir Khason
I have some classes that basicly do the same things but different way.
There are no default constructors in those classes each constructor should
recieve same value
So
Fooclass:MyBasicClass or Fooclass:IBasicClass
and I want to be able to call form program something like this:
MyBasicClass foo = new MyBasicClass(value);
or
IBasicInterface foo = new IBasicInterface(value);
Interfaces,Abstracts or Virtuals does not support constructors with
parameters
So trying:
MyBasicClass foo = MyBasicClass.GetInstance(value);
or
IBasicInterface foo = IBasicInterface.GetInstance(value);
and in each class something like
if(this=null)
return new Fooclass(value);
else
return this;
But I can not create static methods neither in interface, abstract or
virtual
So how to implement such architecture???
TNX
There are no default constructors in those classes each constructor should
recieve same value
So
Fooclass:MyBasicClass or Fooclass:IBasicClass
and I want to be able to call form program something like this:
MyBasicClass foo = new MyBasicClass(value);
or
IBasicInterface foo = new IBasicInterface(value);
Interfaces,Abstracts or Virtuals does not support constructors with
parameters
So trying:
MyBasicClass foo = MyBasicClass.GetInstance(value);
or
IBasicInterface foo = IBasicInterface.GetInstance(value);
and in each class something like
if(this=null)
return new Fooclass(value);
else
return this;
But I can not create static methods neither in interface, abstract or
virtual
So how to implement such architecture???
TNX