1
2
3
4
5
6 namespace System
7 {
8 public inline constexpr nothrow byte MinValue(byte)
9 {
10 return cast<byte>(0x00);
11 }
12
13 public inline constexpr nothrow byte MaxValue(byte)
14 {
15 return cast<byte>(0xFF);
16 }
17
18 public inline constexpr nothrow sbyte MinValue(sbyte)
19 {
20 return cast<sbyte>(0x80);
21 }
22
23 public inline constexpr nothrow sbyte MaxValue(sbyte)
24 {
25 return cast<sbyte>(0x7F);
26 }
27
28 public inline constexpr nothrow short MinValue(short)
29 {
30 return cast<short>(0x8000);
31 }
32
33 public inline constexpr nothrow short MaxValue(short)
34 {
35 return cast<short>(0x7FFF);
36 }
37
38 public inline constexpr nothrow ushort MinValue(ushort)
39 {
40 return cast<ushort>(0x0000);
41 }
42
43 public inline constexpr nothrow ushort MaxValue(ushort)
44 {
45 return cast<ushort>(0xFFFF);
46 }
47
48 public inline constexpr nothrow int MinValue(int)
49 {
50 return cast<int>(0x80000000);
51 }
52
53 public inline constexpr nothrow int MaxValue(int)
54 {
55 return cast<int>(0x7FFFFFFF);
56 }
57
58 public inline constexpr nothrow uint MinValue(uint)
59 {
60 return cast<uint>(0x00000000);
61 }
62
63 public inline constexpr nothrow uint MaxValue(uint)
64 {
65 return cast<uint>(0xFFFFFFFF);
66 }
67
68 public inline constexpr nothrow long MinValue(long)
69 {
70 return cast<long>(0x8000000000000000);
71 }
72
73 public inline constexpr nothrow long MaxValue(long)
74 {
75 return cast<long>(0x7FFFFFFFFFFFFFFF);
76 }
77
78 public inline constexpr nothrow ulong MinValue(ulong)
79 {
80 return cast<ulong>(0x0000000000000000);
81 }
82
83 public inline constexpr nothrow ulong MaxValue(ulong)
84 {
85 return cast<ulong>(0xFFFFFFFFFFFFFFFF);
86 }
87
88 public inline constexpr nothrow I MinValue<I>()
89 {
90 return MinValue(cast<I>(0));
91 }
92
93 public inline constexpr nothrow I MaxValue<I>()
94 {
95 return MaxValue(cast<I>(0));
96 }
97 }