public Conversions() { MyNum n1 = (MyNum)99; Console.WriteLine(n1.name + ", value " + n1.val); MyNum n2 = new MyNum(99); Console.WriteLine((string)n2); }
public MyType(MyNum num) // You need to call the base class constructor // here to construct that portion of yourself : base(42) // Call this with an int... { this.num2 = num; }