I have two classes declared as follows:
class Object1
{
protected ulong guid;
protected uint type;
public Object1(ulong Guid, uint Type)
{
this.guid = Guid;
this.type = Type
}
}
class Object2 : Object1
{
}
In the client code, I want to instantiate each object as follows:
Object1 MyObject1 = new Object1(123456789, 555);
Object2 MyObject2 = new Object2(987654321, 111);
How can I force Object2 to use the constructor of Object1? Thankyou.
James
source
share