2 * Test explicit numeric conversions.
9 void asbyte (byte a, ushort b, uint c, ulong d, char e)
17 asbyte ((byte) s, (ushort) s, (uint) s, (ulong) s, (char) s);
18 asbyte (checked ((byte) s), checked ((ushort) s), checked ((uint) s), checked ((ulong) s), checked ((char) s));
21 void abyte (sbyte a, char b)
29 abyte ((sbyte) b, (char) b);
30 abyte (checked ((sbyte) b), checked ((char) b));
33 void ashort (sbyte a, byte b, ushort c, uint d, ulong e, char f)
41 ashort ((sbyte) a, (byte) a, (ushort) a, (uint) a, (ulong) a, (char) a);
42 ashort (checked ((sbyte) a), checked ((byte) a), checked ((ushort) a), checked ((uint) a), checked ((ulong) a), checked ((char) a));
45 void aushort (sbyte a, byte b, short c, char d)
52 aushort ((sbyte) a, (byte) a, (short) a, (char) a);
53 aushort (checked ((sbyte) a), checked ((byte) a), checked ((short) a), checked ((char) a));
56 void aint (sbyte a, byte b, short c, ushort d, uint e, ulong f, char g)
64 aint ((sbyte) a, (byte) a, (short) a, (ushort) a, (uint) a, (ulong) a, (char) a);
65 aint (checked ((sbyte) a), checked ((byte) a), checked ((short) a), checked ((ushort) a), checked ((uint) a), checked ((ulong) a), checked ((char) a));
68 void auint (sbyte a, byte b, short c, ushort d, int e, char f)
76 auint ((sbyte) a, (byte) a, (short) a, (ushort) a, (int) a, (char) a);
77 auint (checked ((sbyte) a), checked ((byte) a), checked ((short) a), checked ((ushort) a), checked ((int) a), checked ((char) a));
80 void along (sbyte a, byte b, short c, ushort d, int e, uint f, ulong g, char h)
88 along ((sbyte) a, (byte) a, (short) a, (ushort) a, (int) a, (uint) a, (ulong) a, (char) a);
89 along (checked ((sbyte) a), checked ((byte) a), checked ((short) a), checked ((ushort) a), checked ((int) a), checked ((uint) a), checked ((ulong) a), checked ((char) a));
92 void aulong (sbyte a, byte b, short c, ushort d, int e, uint f, long g, char h)
100 aulong ((sbyte) a, (byte) a, (short) a, (ushort) a, (int) a, (uint) a, (long) a, (char) a);
101 aulong (checked ((sbyte) a), checked ((byte) a), checked ((short) a), checked ((ushort) a), checked ((int) a), checked ((uint) a), checked ((long) a), checked ((char) a));
104 void achar (sbyte a, byte b, short c)
113 achar ((sbyte) a, (byte) a, (short) a);
114 achar (checked ((sbyte) a), checked ((byte) a), checked ((short) a));
117 void afloat (sbyte a, byte b, short c, ushort d, int e, uint f, long ll, ulong g, char h, decimal dd)
125 afloat ((sbyte) a, (byte) a, (short) a, (ushort) a, (int) a, (uint) a, (long) a,
126 (ulong) a, (char) a, (decimal) a);
127 afloat (checked ((sbyte) a), checked ((byte) a), checked ((short) a), checked ((ushort) a), checked ((int) a), checked ((uint) a), checked ((long) a),
128 checked ( (ulong) a), checked ((char) a), checked ((decimal) a));
131 void adouble (sbyte a, byte b, short c, ushort d, int e, uint f, long ll, ulong g, char h,
132 float ff, decimal dd)
140 adouble ((sbyte) a, (byte) a, (short) a, (ushort) a, (int) a, (uint) a, (long) a,
141 (ulong) a, (char) a, (float) a, (decimal) a);
142 adouble (checked ((sbyte) a), checked ((byte) a), checked ((short) a), checked ((ushort) a), checked ((int) a), checked ((uint) a), checked ((long) a),
143 checked ( (ulong) a), checked ((char) a), checked ((float) a), (decimal) a);
146 void TestDecimal (decimal d)
148 double dec = (double)d;
149 decimal dec2 = (decimal)dec;
166 string s = (string)null;
167 const decimal d = -10.1m;
168 const long l = (long)d;
169 char ch = (char)E.Min;
170 bool b = (DBNull) null == null;