Example #1
0
 public static void RunTest()
 {
     var                child      = new Child();
     var                otherChild = new OtherChild();
     MyObj <Child>      myObj      = child.GetMyObj();
     MyObj <OtherChild> myOtherObj = otherChild.GetMyObj();
 }
    void Method()
    {
        ChildClass cc = new ChildClass();
        OtherChild oc = new OtherChild();

        //Set the name property of childclass
        ChildClass.s_name = "some name"; // obviously a shared static because using ChildClass.members not cc.member
        cc.Name           = "some name"; // now all instances of ChildClass will have this name
    }