<Compile Include="$(BclSourcesRoot)\System\ArgIterator.cs" />
<Compile Include="$(BclSourcesRoot)\System\Attribute.cs" />
<Compile Include="$(BclSourcesRoot)\System\BadImageFormatException.CoreCLR.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Boolean.cs" />
<Compile Include="$(BclSourcesRoot)\System\Buffer.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Byte.cs" />
<Compile Include="$(BclSourcesRoot)\System\CompatibilitySwitches.cs" />
<Compile Include="$(BclSourcesRoot)\System\Currency.cs" />
<Compile Include="$(BclSourcesRoot)\System\Decimal.cs" />
<Compile Include="$(BclSourcesRoot)\System\GC.cs" />
<Compile Include="$(BclSourcesRoot)\System\Guid.cs" />
<Compile Include="$(BclSourcesRoot)\System\InsufficientMemoryException.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Int16.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Int32.cs" />
- <Compile Include="$(BclSourcesRoot)\System\Int64.cs" />
<Compile Include="$(BclSourcesRoot)\System\IntPtr.cs" />
<Compile Include="$(BclSourcesRoot)\System\Internal.cs" />
<Compile Include="$(BclSourcesRoot)\System\Math.cs" />
<Compile Include="$(BclSourcesRoot)\System\RtType.cs" />
<Compile Include="$(BclSourcesRoot)\System\RuntimeArgumentHandle.cs" />
<Compile Include="$(BclSourcesRoot)\System\RuntimeHandles.cs" />
- <Compile Include="$(BclSourcesRoot)\System\SByte.cs" />
<Compile Include="$(BclSourcesRoot)\System\SerializableAttribute.cs" />
<Compile Include="$(BclSourcesRoot)\System\SharedStatics.cs" />
<Compile Include="$(BclSourcesRoot)\System\StubHelpers.cs" />
<Compile Include="$(BclSourcesRoot)\System\TypeNameParser.cs" />
<Compile Include="$(BclSourcesRoot)\System\TypedReference.cs" />
<Compile Include="$(BclSourcesRoot)\System\TypeLoadException.cs" />
- <Compile Include="$(BclSourcesRoot)\System\UInt16.cs" />
- <Compile Include="$(BclSourcesRoot)\System\UInt32.cs" />
- <Compile Include="$(BclSourcesRoot)\System\UInt64.cs" />
<Compile Include="$(BclSourcesRoot)\System\UIntPtr.cs" />
<Compile Include="$(BclSourcesRoot)\System\ValueType.cs" />
<Compile Include="$(BclSourcesRoot)\System\WeakReference.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\AttributeUsageAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\BadImageFormatException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\BitConverter.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Boolean.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Buffers\ArrayPool.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Buffers\ArrayPoolEventSource.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Buffers\ConfigurableArrayPool.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Buffers\TlsOverPerCoreLockedStacksArrayPool.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Buffers\Utilities.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Byte.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Char.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\CharEnumerator.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\CLSCompliantAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IObservable.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IObserver.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\IProgress.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Int16.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Int32.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\Int64.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Lazy.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\MarshalByRefObject.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\MemberAccessException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Serialization\StreamingContext.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Versioning\NonVersionableAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Runtime\Versioning\TargetFrameworkAttribute.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\SByte.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Security\AllowPartiallyTrustedCallersAttribute.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Security\CryptographicException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\Security\PartialTrustVisibilityLevel.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\TypeCode.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\TypeInitializationException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\TypeUnloadedException.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\UInt16.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\UInt32.cs" />
+ <Compile Include="$(MSBuildThisFileDirectory)System\UInt64.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\UnauthorizedAccessException.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\UnhandledExceptionEventArgs.cs" />
<Compile Include="$(MSBuildThisFileDirectory)System\UnhandledExceptionEventHandler.cs" />
**
===========================================================*/
-using System;
-using System.Globalization;
using System.Diagnostics.Contracts;
+using System.Globalization;
+using System.Runtime.CompilerServices;
+using System.Runtime.Versioning;
namespace System
{
- // The Boolean class provides the
- // object representation of the boolean primitive type.
[Serializable]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+ [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
public struct Boolean : IComparable, IConvertible, IComparable<Boolean>, IEquatable<Boolean>
{
//
internal const int True = 1;
// The false value.
- //
+ //
internal const int False = 0;
public String ToString(IFormatProvider provider)
{
- if (false == m_value)
- {
- return FalseLiteral;
- }
- return TrueLiteral;
+ return ToString();
}
// Determines whether two Boolean objects are equal.
return (m_value == ((Boolean)obj).m_value);
}
- [System.Runtime.Versioning.NonVersionable]
+ [NonVersionable]
public bool Equals(Boolean obj)
{
return m_value == obj;
**
===========================================================*/
-
-using System;
+using System.Diagnostics.Contracts;
using System.Globalization;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
namespace System
{
- // The Byte class extends the Value class and
- // provides object representation of the byte primitive type.
- //
[Serializable]
- [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public struct Byte : IComparable, IFormattable, IConvertible
- , IComparable<Byte>, IEquatable<Byte>
+ [StructLayout(LayoutKind.Sequential)]
+ [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+ public struct Byte : IComparable, IConvertible, IFormattable, IComparable<Byte>, IEquatable<Byte>
{
private byte m_value; // Do not rename (binary serialization)
return m_value == ((Byte)obj).m_value;
}
- [System.Runtime.Versioning.NonVersionable]
+ [NonVersionable]
public bool Equals(Byte obj)
{
return m_value == obj;
**
===========================================================*/
-using System;
using System.Diagnostics.Contracts;
using System.Globalization;
using System.Runtime.CompilerServices;
-using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
[Serializable]
[StructLayout(LayoutKind.Sequential)]
[TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public struct Double :IComparable, IConvertible, IFormattable, IComparable<Double>, IEquatable<Double>
+ public struct Double : IComparable, IConvertible, IFormattable, IComparable<Double>, IEquatable<Double>
{
private double m_value; // Do not rename (binary serialization)
**
===========================================================*/
-
-using System;
+using System.Diagnostics.Contracts;
using System.Globalization;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
namespace System
{
[Serializable]
- [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public struct Int16 : IComparable, IFormattable, IConvertible
- , IComparable<Int16>, IEquatable<Int16>
+ [StructLayout(LayoutKind.Sequential)]
+ [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+ public struct Int16 : IComparable, IConvertible, IFormattable, IComparable<Int16>, IEquatable<Int16>
{
private short m_value; // Do not rename (binary serialization)
return m_value == ((Int16)obj).m_value;
}
- [System.Runtime.Versioning.NonVersionable]
+ [NonVersionable]
public bool Equals(Int16 obj)
{
return m_value == obj;
**
===========================================================*/
-using System;
+using System.Diagnostics.Contracts;
using System.Globalization;
-using System.Runtime;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
namespace System
{
[Serializable]
- [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public struct Int32 : IComparable, IFormattable, IConvertible
- , IComparable<Int32>, IEquatable<Int32>
+ [StructLayout(LayoutKind.Sequential)]
+ [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+ public struct Int32 : IComparable, IConvertible, IFormattable, IComparable<Int32>, IEquatable<Int32>
{
private int m_value; // Do not rename (binary serialization)
// Compares this object to another object, returning an integer that
// indicates the relationship.
- // Returns a value less than zero if this object
- // null is considered to be less than any instance.
+ // Returns :
+ // 0 if the values are equal
+ // Negative number if _value is less than value
+ // Positive number if _value is more than value
+ // null is considered to be less than any instance, hence returns positive number
// If object is not of type Int32, this method throws an ArgumentException.
//
public int CompareTo(Object value)
}
if (value is Int32)
{
- // Need to use compare because subtraction will wrap
- // to positive for very large neg numbers, etc.
+ // NOTE: Cannot use return (_value - value) as this causes a wrap
+ // around in cases where _value - value > MaxValue.
int i = (int)value;
if (m_value < i) return -1;
if (m_value > i) return 1;
public int CompareTo(int value)
{
- // Need to use compare because subtraction will wrap
- // to positive for very large neg numbers, etc.
+ // NOTE: Cannot use return (_value - value) as this causes a wrap
+ // around in cases where _value - value > MaxValue.
if (m_value < value) return -1;
if (m_value > value) return 1;
return 0;
return m_value == ((Int32)obj).m_value;
}
- [System.Runtime.Versioning.NonVersionable]
+ [NonVersionable]
public bool Equals(Int32 obj)
{
return m_value == obj;
**
===========================================================*/
-using System;
+using System.Diagnostics.Contracts;
using System.Globalization;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
namespace System
{
[Serializable]
- [System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public struct Int64 : IComparable, IFormattable, IConvertible
- , IComparable<Int64>, IEquatable<Int64>
+ [StructLayout(LayoutKind.Sequential)]
+ [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+ public struct Int64 : IComparable, IConvertible, IFormattable, IComparable<Int64>, IEquatable<Int64>
{
private long m_value; // Do not rename (binary serialization)
// The .NET Foundation licenses this file to you under the MIT license.
// See the LICENSE file in the project root for more information.
-/*============================================================
-**
-**
-**
-** Purpose:
-**
-**
-===========================================================*/
-
+using System.Diagnostics.Contracts;
using System.Globalization;
-using System;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
namespace System
{
- // A place holder class for signed bytes.
[Serializable]
- [CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public struct SByte : IComparable, IFormattable, IConvertible
- , IComparable<SByte>, IEquatable<SByte>
+ [CLSCompliant(false)] [StructLayout(LayoutKind.Sequential)]
+ [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+ public struct SByte : IComparable, IConvertible, IFormattable, IComparable<SByte>, IEquatable<SByte>
{
private sbyte m_value; // Do not rename (binary serialization)
return m_value == ((SByte)obj).m_value;
}
- [System.Runtime.Versioning.NonVersionable]
+ [NonVersionable]
public bool Equals(SByte obj)
{
return m_value == obj;
**
===========================================================*/
-using System;
using System.Diagnostics.Contracts;
using System.Globalization;
using System.Runtime.CompilerServices;
-using System.Runtime.ConstrainedExecution;
using System.Runtime.InteropServices;
using System.Runtime.Versioning;
**
===========================================================*/
+using System.Diagnostics.Contracts;
using System.Globalization;
-using System;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
namespace System
{
- // Wrapper for unsigned 16 bit integers.
[Serializable]
- [CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public struct UInt16 : IComparable, IFormattable, IConvertible
- , IComparable<UInt16>, IEquatable<UInt16>
+ [CLSCompliant(false)]
+ [StructLayout(LayoutKind.Sequential)]
+ [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+ public struct UInt16 : IComparable, IConvertible, IFormattable, IComparable<UInt16>, IEquatable<UInt16>
{
private ushort m_value; // Do not rename (binary serialization)
**
===========================================================*/
+using System.Diagnostics.Contracts;
using System.Globalization;
-using System;
-using System.Runtime;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
namespace System
{
- // * Wrapper for unsigned 32 bit integers.
[Serializable]
- [CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public struct UInt32 : IComparable, IFormattable, IConvertible
- , IComparable<UInt32>, IEquatable<UInt32>
+ [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>
{
private uint m_value; // Do not rename (binary serialization)
**
===========================================================*/
+using System.Diagnostics.Contracts;
using System.Globalization;
-using System;
+using System.Runtime.CompilerServices;
using System.Runtime.InteropServices;
-using System.Diagnostics.Contracts;
+using System.Runtime.Versioning;
namespace System
{
- // Wrapper for unsigned 64 bit integers.
[Serializable]
- [CLSCompliant(false), System.Runtime.InteropServices.StructLayout(LayoutKind.Sequential)]
- [System.Runtime.CompilerServices.TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
- public struct UInt64 : IComparable, IFormattable, IConvertible
- , IComparable<UInt64>, IEquatable<UInt64>
+ [CLSCompliant(false)]
+ [StructLayout(LayoutKind.Sequential)]
+ [TypeForwardedFrom("mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089")]
+ public struct UInt64 : IComparable, IConvertible, IFormattable, IComparable<UInt64>, IEquatable<UInt64>
{
private ulong m_value; // Do not rename (binary serialization)