using System; struct Dt { byte v; public Dt(byte v) { if (v > 9) throw new ArgumentException(); this.v = v; } public static implicit operator byte(Dt d) { Console.Write( "1 - "); return d.v; } public static implicit operator short(Dt d) { Console.Write( "2 - " ); return d.v; } } class Test { public static void Main() { Dt d = new Dt(9); byte b = d; short c = d; Console.WriteLine("{0} {1}",b,c); } }