7 public Decimal2 (double d
)
9 value = new Decimal (d
);
12 public Decimal2 (Decimal d
)
17 public static explicit operator Decimal2 (Decimal d
)
19 return new Decimal2 (d
);
22 public static explicit operator Decimal2 (double d
)
24 return new Decimal2 (d
);
27 public static implicit operator Decimal (Decimal2 d
)
32 private Decimal
value;
35 public static void Main (string [] args
)
37 Console
.WriteLine ("double = {0}", 1.1367 * 11.9767 - 0.6);
38 Console
.WriteLine ("Decimal2 = {0}", ((Decimal2
) 1.1367 * (Decimal2
) 11.9767 - (Decimal2
) 0.6));
39 Console
.WriteLine ("Decimal2 = {0}", new Decimal2 (1.1367) * (Decimal2
) 11.9767 - (Decimal2
) 0.6);
40 Console
.WriteLine ("Decimal2 = {0}", (Decimal2
) 11.9767 * new Decimal2 (1.1367) - (Decimal2
) 0.6);
41 Console
.WriteLine ("Decimal2 = {0}", (new Decimal2 (1.1367) * (Decimal2
) 11.9767 - (Decimal2
) 0.6));
42 Console
.WriteLine ("Decimal2 = {0}", ((Decimal2
) 1.1367 * (Decimal2
) 11.9767 - (Decimal
) 0.6));
43 Console
.WriteLine ("Decimal2 = {0}", (1.14 * 11.9767 - 0.6));
44 Console
.WriteLine ("Decimal2 = {0}", ((Decimal2
) 1.1367 * (Decimal
) 11.9767 - (Decimal2
) 0.6));
45 Console
.WriteLine ("Decimal2 = {0}", ((Decimal2
) 1.1367 * (Decimal2
) 11.9767 - (Decimal2
) 0.6));