1 // cs_keyword_explicit.cs
6 public Digit(byte value)
8 if (value<0 || value>9) throw new ArgumentException();
12 // define explicit byte-to-Digit conversion operator:
13 public static explicit operator Digit(byte b
)
15 Console
.WriteLine("conversion occurred");
22 public static void Main()
25 Digit d
= (Digit
)b
; // explicit conversion