Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'src/System.Private.CoreLib/shared/System/UInt32.cs')
-rw-r--r--src/System.Private.CoreLib/shared/System/UInt32.cs42
1 files changed, 21 insertions, 21 deletions
diff --git a/src/System.Private.CoreLib/shared/System/UInt32.cs b/src/System.Private.CoreLib/shared/System/UInt32.cs
index 1e33dcf17..5ed193e95 100644
--- a/src/System.Private.CoreLib/shared/System/UInt32.cs
+++ b/src/System.Private.CoreLib/shared/System/UInt32.cs
@@ -13,9 +13,9 @@ namespace System
[CLSCompliant(false)]
[StructLayout(LayoutKind.Sequential)]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public struct UInt32 : IComparable, IConvertible, IFormattable, IComparable<UInt32>, IEquatable<UInt32>, ISpanFormattable
+ public readonly struct UInt32 : IComparable, IConvertible, IFormattable, IComparable<uint>, IEquatable<uint>, ISpanFormattable
{
- private uint m_value; // Do not rename (binary serialization)
+ private readonly uint m_value; // Do not rename (binary serialization)
public const uint MaxValue = (uint)0xffffffff;
public const uint MinValue = 0U;
@@ -27,13 +27,13 @@ namespace System
// null is considered to be less than any instance.
// If object is not of type UInt32, this method throws an ArgumentException.
//
- public int CompareTo(Object value)
+ public int CompareTo(object value)
{
if (value == null)
{
return 1;
}
- if (value is UInt32)
+ if (value is uint)
{
// Need to use compare because subtraction will wrap
// to positive for very large neg numbers, etc.
@@ -45,7 +45,7 @@ namespace System
throw new ArgumentException(SR.Arg_MustBeUInt32);
}
- public int CompareTo(UInt32 value)
+ public int CompareTo(uint value)
{
// Need to use compare because subtraction will wrap
// to positive for very large neg numbers, etc.
@@ -54,17 +54,17 @@ namespace System
return 0;
}
- public override bool Equals(Object obj)
+ public override bool Equals(object obj)
{
- if (!(obj is UInt32))
+ if (!(obj is uint))
{
return false;
}
- return m_value == ((UInt32)obj).m_value;
+ return m_value == ((uint)obj).m_value;
}
[NonVersionable]
- public bool Equals(UInt32 obj)
+ public bool Equals(uint obj)
{
return m_value == obj;
}
@@ -76,22 +76,22 @@ namespace System
}
// The base 10 representation of the number with no extra padding.
- public override String ToString()
+ public override string ToString()
{
return Number.FormatUInt32(m_value, null, null);
}
- public String ToString(IFormatProvider provider)
+ public string ToString(IFormatProvider provider)
{
return Number.FormatUInt32(m_value, null, provider);
}
- public String ToString(String format)
+ public string ToString(string format)
{
return Number.FormatUInt32(m_value, format, null);
}
- public String ToString(String format, IFormatProvider provider)
+ public string ToString(string format, IFormatProvider provider)
{
return Number.FormatUInt32(m_value, format, provider);
}
@@ -102,14 +102,14 @@ namespace System
}
[CLSCompliant(false)]
- public static uint Parse(String s)
+ public static uint Parse(string s)
{
if (s == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
return Number.ParseUInt32(s, NumberStyles.Integer, NumberFormatInfo.CurrentInfo);
}
[CLSCompliant(false)]
- public static uint Parse(String s, NumberStyles style)
+ public static uint Parse(string s, NumberStyles style)
{
NumberFormatInfo.ValidateParseStyleInteger(style);
if (s == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
@@ -118,14 +118,14 @@ namespace System
[CLSCompliant(false)]
- public static uint Parse(String s, IFormatProvider provider)
+ public static uint Parse(string s, IFormatProvider provider)
{
if (s == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
return Number.ParseUInt32(s, NumberStyles.Integer, NumberFormatInfo.GetInstance(provider));
}
[CLSCompliant(false)]
- public static uint Parse(String s, NumberStyles style, IFormatProvider provider)
+ public static uint Parse(string s, NumberStyles style, IFormatProvider provider)
{
NumberFormatInfo.ValidateParseStyleInteger(style);
if (s == null) ThrowHelper.ThrowArgumentNullException(ExceptionArgument.s);
@@ -140,7 +140,7 @@ namespace System
}
[CLSCompliant(false)]
- public static bool TryParse(String s, out UInt32 result)
+ public static bool TryParse(string s, out uint result)
{
if (s == null)
{
@@ -158,7 +158,7 @@ namespace System
}
[CLSCompliant(false)]
- public static bool TryParse(String s, NumberStyles style, IFormatProvider provider, out UInt32 result)
+ public static bool TryParse(string s, NumberStyles style, IFormatProvider provider, out uint result)
{
NumberFormatInfo.ValidateParseStyleInteger(style);
@@ -247,7 +247,7 @@ namespace System
return Convert.ToDouble(m_value);
}
- Decimal IConvertible.ToDecimal(IFormatProvider provider)
+ decimal IConvertible.ToDecimal(IFormatProvider provider)
{
return Convert.ToDecimal(m_value);
}
@@ -257,7 +257,7 @@ namespace System
throw new InvalidCastException(SR.Format(SR.InvalidCast_FromTo, "UInt32", "DateTime"));
}
- Object IConvertible.ToType(Type type, IFormatProvider provider)
+ object IConvertible.ToType(Type type, IFormatProvider provider)
{
return Convert.DefaultToType((IConvertible)this, type, provider);
}