From 9ccdb26239cb6d6d56409538d41b202fea6d3aa0 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Wed, 6 Apr 2022 16:07:02 -0700 Subject: [PATCH 1/7] Uncomment the user-defined checked operators for generic math --- .../System.Private.CoreLib/src/System/Byte.cs | 14 +++++------ .../System.Private.CoreLib/src/System/Char.cs | 14 +++++------ .../src/System/DateTime.cs | 6 ++--- .../src/System/DateTimeOffset.cs | 6 ++--- .../src/System/Decimal.cs | 14 +++++------ .../src/System/Double.cs | 20 ++++++++-------- .../System.Private.CoreLib/src/System/Half.cs | 24 ++++++------------- .../src/System/Int16.cs | 14 +++++------ .../src/System/Int32.cs | 14 +++++------ .../src/System/Int64.cs | 14 +++++------ .../src/System/IntPtr.cs | 14 +++++------ .../src/System/Numerics/IAdditionOperators.cs | 2 +- .../System/Numerics/IDecrementOperators.cs | 2 +- .../src/System/Numerics/IDivisionOperators.cs | 2 +- .../System/Numerics/IIncrementOperators.cs | 2 +- .../src/System/Numerics/IMultiplyOperators.cs | 2 +- .../System/Numerics/ISubtractionOperators.cs | 2 +- .../Numerics/IUnaryNegationOperators.cs | 2 +- .../src/System/SByte.cs | 14 +++++------ .../src/System/Single.cs | 20 ++++++++-------- .../src/System/TimeOnly.cs | 7 ++++++ .../src/System/TimeSpan.cs | 12 +++++----- .../src/System/UInt16.cs | 14 +++++------ .../src/System/UInt32.cs | 14 +++++------ .../src/System/UInt64.cs | 14 +++++------ .../src/System/UIntPtr.cs | 14 +++++------ 26 files changed, 137 insertions(+), 140 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Byte.cs b/src/libraries/System.Private.CoreLib/src/System/Byte.cs index 1300066cd4d70..f114aed420c6d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Byte.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Byte.cs @@ -301,7 +301,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static byte IAdditionOperators.operator +(byte left, byte right) => (byte)(left + right); // /// - // static byte IAdditionOperators.operator checked +(byte left, byte right) => checked((byte)(left + right)); + static byte IAdditionOperators.operator checked +(byte left, byte right) => checked((byte)(left + right)); // // IAdditiveIdentity @@ -382,7 +382,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static byte IDecrementOperators.operator --(byte value) => --value; // /// - // static byte IDecrementOperators.operator checked --(byte value) => checked(--value); + static byte IDecrementOperators.operator checked --(byte value) => checked(--value); // // IDivisionOperators @@ -392,7 +392,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static byte IDivisionOperators.operator /(byte left, byte right) => (byte)(left / right); // /// - // static byte IDivisionOperators.operator checked /(byte left, byte right) => checked((byte)(left / right)); + static byte IDivisionOperators.operator checked /(byte left, byte right) => checked((byte)(left / right)); // // IEqualityOperators @@ -412,7 +412,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static byte IIncrementOperators.operator ++(byte value) => ++value; // /// - // static byte IIncrementOperators.operator checked ++(byte value) => checked(++value); + static byte IIncrementOperators.operator checked ++(byte value) => checked(++value); // // IMinMaxValue @@ -446,7 +446,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static byte IMultiplyOperators.operator *(byte left, byte right) => (byte)(left * right); // /// - // static byte IMultiplyOperators.operator checked *(byte left, byte right) => checked((byte)(left * right)); + static byte IMultiplyOperators.operator checked *(byte left, byte right) => checked((byte)(left * right)); // // INumber @@ -938,7 +938,7 @@ public static bool TryCreate(TOther value, out byte result) static byte ISubtractionOperators.operator -(byte left, byte right) => (byte)(left - right); // /// - // static byte ISubtractionOperators.operator checked -(byte left, byte right) => checked((byte)(left - right)); + static byte ISubtractionOperators.operator checked -(byte left, byte right) => checked((byte)(left - right)); // // IUnaryNegationOperators @@ -948,7 +948,7 @@ public static bool TryCreate(TOther value, out byte result) static byte IUnaryNegationOperators.operator -(byte value) => (byte)(-value); // /// - // static byte IUnaryNegationOperators.operator checked -(byte value) => checked((byte)(-value)); + static byte IUnaryNegationOperators.operator checked -(byte value) => checked((byte)(-value)); // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Char.cs b/src/libraries/System.Private.CoreLib/src/System/Char.cs index 06c575f509e95..e265e0885c04c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Char.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Char.cs @@ -1069,7 +1069,7 @@ public static int ConvertToUtf32(string s, int index) static char IAdditionOperators.operator +(char left, char right) => (char) (left + right); // /// - // static char IAdditionOperators.operator checked +(char left, char right) => checked((char)(left + right)); + static char IAdditionOperators.operator checked +(char left, char right) => checked((char)(left + right)); // // IAdditiveIdentity @@ -1150,7 +1150,7 @@ public static int ConvertToUtf32(string s, int index) static char IDecrementOperators.operator --(char value) => --value; // /// - // static char IDecrementOperators.operator checked --(char value) => checked(--value); + static char IDecrementOperators.operator checked --(char value) => checked(--value); // // IDivisionOperators @@ -1160,7 +1160,7 @@ public static int ConvertToUtf32(string s, int index) static char IDivisionOperators.operator /(char left, char right) => (char)(left / right); // /// - // static char IDivisionOperators.operator /(char left, char right) => checked((char)(left / right)); + static char IDivisionOperators.operator checked /(char left, char right) => checked((char)(left / right)); // // IEqualityOperators @@ -1180,7 +1180,7 @@ public static int ConvertToUtf32(string s, int index) static char IIncrementOperators.operator ++(char value) => ++value; // /// - // static char IIncrementOperators.operator checked ++(char value) => checked(++value); + static char IIncrementOperators.operator checked ++(char value) => checked(++value); // // IMinMaxValue @@ -1214,7 +1214,7 @@ public static int ConvertToUtf32(string s, int index) static char IMultiplyOperators.operator *(char left, char right) => (char)(left * right); // /// - // static char IMultiplyOperators.operator checked *(char left, char right) => checked((char)(left * right)); + static char IMultiplyOperators.operator checked *(char left, char right) => checked((char)(left * right)); // // INumber @@ -1734,7 +1734,7 @@ static bool ISpanParsable.TryParse(ReadOnlySpan s, IFormatProvider? static char ISubtractionOperators.operator -(char left, char right) => (char)(left - right); // /// - // static char ISubtractionOperators.operator checked -(char left, char right) => checked((char)(left - right)); + static char ISubtractionOperators.operator checked -(char left, char right) => checked((char)(left - right)); // // IUnaryNegationOperators @@ -1744,7 +1744,7 @@ static bool ISpanParsable.TryParse(ReadOnlySpan s, IFormatProvider? static char IUnaryNegationOperators.operator -(char value) => (char)(-value); // /// - // static char IUnaryNegationOperators.operator checked -(char value) => checked((char)(-value)); + static char IUnaryNegationOperators.operator checked -(char value) => checked((char)(-value)); // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/DateTime.cs b/src/libraries/System.Private.CoreLib/src/System/DateTime.cs index b3cc06c3725fa..984ca1adddf7f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DateTime.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DateTime.cs @@ -1512,7 +1512,7 @@ internal static bool TryCreate(int year, int month, int day, int hour, int minut // // /// - // static DateTime IAdditionOperators.operator checked +(DateTime left, TimeSpan right) => checked(left + right); + static DateTime IAdditionOperators.operator checked +(DateTime left, TimeSpan right) => left + right; // // IAdditiveIdentity @@ -1551,9 +1551,9 @@ internal static bool TryCreate(int year, int month, int day, int hour, int minut // // /// - // static DateTime ISubtractionOperators.operator checked -(DateTime left, TimeSpan right) => checked(left - right); + static DateTime ISubtractionOperators.operator checked -(DateTime left, TimeSpan right) => left - right; // /// - // static TimeSpan ISubtractionOperators.operator checked -(DateTime left, DateTime right) => checked(left - right); + static TimeSpan ISubtractionOperators.operator checked -(DateTime left, DateTime right) => left - right; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs b/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs index 61c57ed07c9a1..75fe77d5aee09 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs @@ -868,7 +868,7 @@ public static implicit operator DateTimeOffset(DateTime dateTime) => // // /// - // static DateTimeOffset IAdditionOperators.operator checked +(DateTimeOffset left, TimeSpan right) => checked(left + right); + static DateTimeOffset IAdditionOperators.operator checked +(DateTimeOffset left, TimeSpan right) => left + right; // // IAdditiveIdentity @@ -907,9 +907,9 @@ public static implicit operator DateTimeOffset(DateTime dateTime) => // // /// - // static DateTimeOffset ISubtractionOperators.operator checked -(DateTimeOffset left, TimeSpan right) => checked(left - right); + static DateTimeOffset ISubtractionOperators.operator checked -(DateTimeOffset left, TimeSpan right) => left - right; // /// - // static TimeSpan ISubtractionOperators.operator checked -(DateTimeOffset left, DateTimeOffset right) => checked(left - right); + static TimeSpan ISubtractionOperators.operator checked -(DateTimeOffset left, DateTimeOffset right) => left - right; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Decimal.cs b/src/libraries/System.Private.CoreLib/src/System/Decimal.cs index e6d63b7fa6ad8..084627db9d0b1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Decimal.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Decimal.cs @@ -1083,7 +1083,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) // // /// - // static decimal IAdditionOperators.operator checked +(decimal left, decimal right) => checked(left + right); + static decimal IAdditionOperators.operator checked +(decimal left, decimal right) => left + right; // // IAdditiveIdentity @@ -1097,21 +1097,21 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) // // /// - // static decimal IDecrementOperators.operator checked --(decimal value) => checked(--value); + static decimal IDecrementOperators.operator checked --(decimal value) => --value; // // IDivisionOperators // // /// - // static decimal IDivisionOperators.operator checked /(decimal left, decimal right) => checked(left / right); + static decimal IDivisionOperators.operator checked /(decimal left, decimal right) => left / right; // // IIncrementOperators // // /// - // static decimal IIncrementOperators.operator checked ++(decimal value) => checked(++value); + static decimal IIncrementOperators.operator checked ++(decimal value) => ++value; // // IMinMaxValue @@ -1135,7 +1135,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) // // /// - // public static decimal operator checked *(decimal left, decimal right) => checked(left * right); + public static decimal operator checked *(decimal left, decimal right) => left * right; // // INumber @@ -1505,13 +1505,13 @@ public static bool TryCreate(TOther value, out decimal result) // // /// - // static decimal ISubtractionOperators.operator checked -(decimal left, decimal right) => checked(left - right); + static decimal ISubtractionOperators.operator checked -(decimal left, decimal right) => left - right; // // IUnaryNegationOperators // // /// - // static decimal IUnaryNegationOperators.operator checked -(decimal value) => checked(-value); + static decimal IUnaryNegationOperators.operator checked -(decimal value) => -value; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Double.cs b/src/libraries/System.Private.CoreLib/src/System/Double.cs index 56ef392dec225..c86eef3ad8349 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Double.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Double.cs @@ -492,7 +492,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static double IAdditionOperators.operator +(double left, double right) => left + right; // /// - // static double IAdditionOperators.operator checked +(double left, double right) => checked(left + right); + static double IAdditionOperators.operator checked +(double left, double right) => left + right; // // IAdditiveIdentity @@ -561,7 +561,7 @@ public static bool IsPow2(double value) static double IDecrementOperators.operator --(double value) => --value; // /// - // static double IDecrementOperators.operator checked --(double value) => checked(--value); + static double IDecrementOperators.operator checked --(double value) => --value; // // IDivisionOperators @@ -571,7 +571,7 @@ public static bool IsPow2(double value) static double IDivisionOperators.operator /(double left, double right) => left / right; // /// - // static double IDivisionOperators.operator checked /(double left, double right) => checked(left / right); + static double IDivisionOperators.operator checked /(double left, double right) => left / right; // // IExponentialFunctions @@ -717,7 +717,7 @@ public static bool IsPow2(double value) static double IIncrementOperators.operator ++(double value) => ++value; // /// - // static double IIncrementOperators.operator checked ++(double value) => checked(++value); + static double IIncrementOperators.operator checked ++(double value) => ++value; // // ILogarithmicFunctions @@ -772,10 +772,10 @@ public static bool IsPow2(double value) // /// - static double IMultiplyOperators.operator *(double left, double right) => (double)(left * right); + static double IMultiplyOperators.operator *(double left, double right) => left * right; // /// - // static double IMultiplyOperators.operator checked *(double left, double right) => checked((double)(left * right)); + static double IMultiplyOperators.operator checked *(double left, double right) => left * right; // // INumber @@ -1153,10 +1153,10 @@ public static bool TryCreate(TOther value, out double result) // /// - static double ISubtractionOperators.operator -(double left, double right) => (double)(left - right); + static double ISubtractionOperators.operator -(double left, double right) => left - right; // /// - // static double ISubtractionOperators.operator checked -(double left, double right) => checked((double)(left - right)); + static double ISubtractionOperators.operator checked -(double left, double right) => left - right; // // ITrigonometricFunctions @@ -1212,10 +1212,10 @@ public static bool TryCreate(TOther value, out double result) // /// - static double IUnaryNegationOperators.operator -(double value) => (double)(-value); + static double IUnaryNegationOperators.operator -(double value) => -value; // /// - // static double IUnaryNegationOperators.operator checked -(double value) => checked((double)(-value)); + static double IUnaryNegationOperators.operator checked -(double value) => -value; // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Half.cs b/src/libraries/System.Private.CoreLib/src/System/Half.cs index 730541d260f53..351607a29057c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Half.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Half.cs @@ -716,7 +716,7 @@ private static double CreateDoubleNaN(bool sign, ulong significand) public static Half operator +(Half left, Half right) => (Half)((float)left + (float)right); // /// - // static Half IAdditionOperators.operator checked +(Half left, Half right) => checked((Half)((float)left + (float)right)); + static Half IAdditionOperators.operator checked +(Half left, Half right) => left + right; // // IAdditiveIdentity @@ -790,12 +790,7 @@ public static bool IsPow2(Half value) } // /// - // static Half IDecrementOperators.operator checked --(Half value) - // { - // var tmp = (float)value; - // --tmp; - // return (Half)tmp; - // } + static Half IDecrementOperators.operator checked --(Half value) => --value; // // IDivisionOperators @@ -805,7 +800,7 @@ public static bool IsPow2(Half value) public static Half operator /(Half left, Half right) => (Half)((float)left / (float)right); // /// - // static Half IDivisionOperators.operator checked /(Half left, Half right) => checked((Half)((float)left / (float)right)); + static Half IDivisionOperators.operator checked /(Half left, Half right) => left / right; // // IExponentialFunctions @@ -944,12 +939,7 @@ public static bool IsPow2(Half value) } // /// - // static Half IIncrementOperators.operator checked ++(Half value) - // { - // var tmp = (float)value; - // ++tmp; - // return (Half)tmp; - // } + static Half IIncrementOperators.operator checked ++(Half value) => ++value; // // ILogarithmicFunctions @@ -995,7 +985,7 @@ public static bool IsPow2(Half value) public static Half operator *(Half left, Half right) => (Half)((float)left * (float)right); // /// - // static Half IMultiplyOperators.operator checked *(Half left, Half right) => checked((Half)((float)left * (float)right)); + static Half IMultiplyOperators.operator checked *(Half left, Half right) => left * right; // // INumber @@ -1376,7 +1366,7 @@ public static bool TryCreate(TOther value, out Half result) public static Half operator -(Half left, Half right) => (Half)((float)left - (float)right); // /// - // static Half ISubtractionOperators.operator checked -(Half left, Half right) => checked((Half)((float)left - (float)right)); + static Half ISubtractionOperators.operator checked -(Half left, Half right) => left - right; // // ITrigonometricFunctions @@ -1439,7 +1429,7 @@ public static (Half Sin, Half Cos) SinCos(Half x) public static Half operator -(Half value) => (Half)(-(float)value); // /// - // static Half IUnaryNegationOperators.operator checked -(Half value) => checked((Half)(-(float)value)); + static Half IUnaryNegationOperators.operator checked -(Half value) => -value; // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Int16.cs b/src/libraries/System.Private.CoreLib/src/System/Int16.cs index 9a03a4f27915c..d07d273a34294 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int16.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int16.cs @@ -307,7 +307,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static short IAdditionOperators.operator +(short left, short right) => (short)(left + right); // /// - // static short IAdditionOperators.operator checked +(short left, short right) => checked((short)(left + right)); + static short IAdditionOperators.operator checked +(short left, short right) => checked((short)(left + right)); // // IAdditiveIdentity @@ -395,7 +395,7 @@ public static short Log2(short value) static short IDecrementOperators.operator --(short value) => --value; // /// - // static short IDecrementOperators.operator checked --(short value) => checked(--value); + static short IDecrementOperators.operator checked --(short value) => checked(--value); // // IDivisionOperators @@ -405,7 +405,7 @@ public static short Log2(short value) static short IDivisionOperators.operator /(short left, short right) => (short)(left / right); // /// - // static short IDivisionOperators.operator checked /(short left, short right) => checked((short)(left / right)); + static short IDivisionOperators.operator checked /(short left, short right) => checked((short)(left / right)); // // IEqualityOperators @@ -425,7 +425,7 @@ public static short Log2(short value) static short IIncrementOperators.operator ++(short value) => ++value; // /// - // static short IIncrementOperators.operator checked ++(short value) => checked(++value); + static short IIncrementOperators.operator checked ++(short value) => checked(++value); // // IMinMaxValue @@ -459,7 +459,7 @@ public static short Log2(short value) static short IMultiplyOperators.operator *(short left, short right) => (short)(left * right); // /// - // static short IMultiplyOperators.operator checked *(short left, short right) => checked((short)(left * right)); + static short IMultiplyOperators.operator checked *(short left, short right) => checked((short)(left * right)); // // INumber @@ -1012,7 +1012,7 @@ public static bool TryCreate(TOther value, out short result) static short ISubtractionOperators.operator -(short left, short right) => (short)(left - right); // /// - // static short ISubtractionOperators.operator checked -(short left, short right) => checked((short)(left - right)); + static short ISubtractionOperators.operator checked -(short left, short right) => checked((short)(left - right)); // // IUnaryNegationOperators @@ -1022,7 +1022,7 @@ public static bool TryCreate(TOther value, out short result) static short IUnaryNegationOperators.operator -(short value) => (short)(-value); // /// - // static short IUnaryNegationOperators.operator checked -(short value) => checked((short)(-value)); + static short IUnaryNegationOperators.operator checked -(short value) => checked((short)(-value)); // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Int32.cs b/src/libraries/System.Private.CoreLib/src/System/Int32.cs index a27ad79bcc043..bec3b7c970644 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int32.cs @@ -299,7 +299,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static int IAdditionOperators.operator +(int left, int right) => left + right; // /// - // static int IAdditionOperators.operator checked +(int left, int right) => checked(left + right); + static int IAdditionOperators.operator checked +(int left, int right) => checked(left + right); // // IAdditiveIdentity @@ -387,7 +387,7 @@ public static int Log2(int value) static int IDecrementOperators.operator --(int value) => --value; // /// - // static int IDecrementOperators.operator checked --(int value) => checked(--value); + static int IDecrementOperators.operator checked --(int value) => checked(--value); // // IDivisionOperators @@ -397,7 +397,7 @@ public static int Log2(int value) static int IDivisionOperators.operator /(int left, int right) => left / right; // /// - // static int IDivisionOperators.operator checked /(int left, int right) => checked(left / right); + static int IDivisionOperators.operator checked /(int left, int right) => checked(left / right); // // IEqualityOperators @@ -417,7 +417,7 @@ public static int Log2(int value) static int IIncrementOperators.operator ++(int value) => ++value; // /// - // static int IIncrementOperators.operator checked ++(int value) => checked(++value); + static int IIncrementOperators.operator checked ++(int value) => checked(++value); // // IMinMaxValue @@ -451,7 +451,7 @@ public static int Log2(int value) static int IMultiplyOperators.operator *(int left, int right) => left * right; // /// - // static int IMultiplyOperators.operator checked *(int left, int right) => checked(left * right); + static int IMultiplyOperators.operator checked *(int left, int right) => checked(left * right); // // INumber @@ -976,7 +976,7 @@ public static bool TryCreate(TOther value, out int result) static int ISubtractionOperators.operator -(int left, int right) => left - right; // /// - // static int ISubtractionOperators.operator checked -(int left, int right) => checked(left - right); + static int ISubtractionOperators.operator checked -(int left, int right) => checked(left - right); // // IUnaryNegationOperators @@ -986,7 +986,7 @@ public static bool TryCreate(TOther value, out int result) static int IUnaryNegationOperators.operator -(int value) => -value; // /// - // static int IUnaryNegationOperators.operator checked -(int value) => checked(-value); + static int IUnaryNegationOperators.operator checked -(int value) => checked(-value); // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Int64.cs b/src/libraries/System.Private.CoreLib/src/System/Int64.cs index 15d22f401a8ba..eeaef27f9f3ab 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int64.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int64.cs @@ -286,7 +286,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static long IAdditionOperators.operator +(long left, long right) => left + right; // /// - // static long IAdditionOperators.operator checked +(long left, long right) => checked(left + right); + static long IAdditionOperators.operator checked +(long left, long right) => checked(left + right); // // IAdditiveIdentity @@ -374,7 +374,7 @@ public static long Log2(long value) static long IDecrementOperators.operator --(long value) => --value; // /// - // static long IDecrementOperators.operator checked --(long value) => checked(--value); + static long IDecrementOperators.operator checked --(long value) => checked(--value); // // IDivisionOperators @@ -384,7 +384,7 @@ public static long Log2(long value) static long IDivisionOperators.operator /(long left, long right) => left / right; // /// - // static long IDivisionOperators.operator checked /(long left, long right) => checked(left / right); + static long IDivisionOperators.operator checked /(long left, long right) => checked(left / right); // // IEqualityOperators @@ -404,7 +404,7 @@ public static long Log2(long value) static long IIncrementOperators.operator ++(long value) => ++value; // /// - // static long IIncrementOperators.operator checked ++(long value) => checked(++value); + static long IIncrementOperators.operator checked ++(long value) => checked(++value); // // IMinMaxValue @@ -438,7 +438,7 @@ public static long Log2(long value) static long IMultiplyOperators.operator *(long left, long right) => left * right; // /// - // static long IMultiplyOperators.operator checked *(long left, long right) => checked(left * right); + static long IMultiplyOperators.operator checked *(long left, long right) => checked(left * right); // // INumber @@ -934,7 +934,7 @@ public static bool TryCreate(TOther value, out long result) static long ISubtractionOperators.operator -(long left, long right) => left - right; // /// - // static long ISubtractionOperators.operator checked -(long left, long right) => checked(left - right); + static long ISubtractionOperators.operator checked -(long left, long right) => checked(left - right); // // IUnaryNegationOperators @@ -944,7 +944,7 @@ public static bool TryCreate(TOther value, out long result) static long IUnaryNegationOperators.operator -(long value) => -value; // /// - // static long IUnaryNegationOperators.operator checked -(long value) => checked(-value); + static long IUnaryNegationOperators.operator checked -(long value) => checked(-value); // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs index c085467da93b2..009f2f1de0f13 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs @@ -271,7 +271,7 @@ public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatPro static nint IAdditionOperators.operator +(nint left, nint right) => left + right; // /// - // static nint IAdditionOperators.operator checked +(nint left, nint right) => checked(left + right); + static nint IAdditionOperators.operator checked +(nint left, nint right) => checked(left + right); // // IAdditiveIdentity @@ -417,7 +417,7 @@ static nint IBinaryNumber.Log2(nint value) static nint IDecrementOperators.operator --(nint value) => --value; // /// - // static nint IDecrementOperators.operator checked --(nint value) => checked(--value); + static nint IDecrementOperators.operator checked --(nint value) => checked(--value); // // IDivisionOperators @@ -427,7 +427,7 @@ static nint IBinaryNumber.Log2(nint value) static nint IDivisionOperators.operator /(nint left, nint right) => left / right; // /// - // static nint IDivisionOperators.operator checked /(nint left, nint right) => checked(left / right); + static nint IDivisionOperators.operator checked /(nint left, nint right) => checked(left / right); // // IIncrementOperators @@ -437,7 +437,7 @@ static nint IBinaryNumber.Log2(nint value) static nint IIncrementOperators.operator ++(nint value) => ++value; // /// - // static nint IIncrementOperators.operator checked ++(nint value) => checked(++value); + static nint IIncrementOperators.operator checked ++(nint value) => checked(++value); // // IMinMaxValue @@ -471,7 +471,7 @@ static nint IBinaryNumber.Log2(nint value) static nint IMultiplyOperators.operator *(nint left, nint right) => left * right; // /// - // static nint IMultiplyOperators.operator checked *(nint left, nint right) => checked(left * right); + static nint IMultiplyOperators.operator checked *(nint left, nint right) => checked(left * right); // // INumber @@ -966,7 +966,7 @@ static bool INumber.TryCreate(TOther value, out nint result) static nint ISubtractionOperators.operator -(nint left, nint right) => left - right; // /// - // static nint ISubtractionOperators.operator checked -(nint left, nint right) => checked(left - right); + static nint ISubtractionOperators.operator checked -(nint left, nint right) => checked(left - right); // // IUnaryNegationOperators @@ -976,7 +976,7 @@ static bool INumber.TryCreate(TOther value, out nint result) static nint IUnaryNegationOperators.operator -(nint value) => -value; // /// - // static nint IUnaryNegationOperators.operator checked -(nint value) => checked(-value); + static nint IUnaryNegationOperators.operator checked -(nint value) => checked(-value); // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IAdditionOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IAdditionOperators.cs index 04634e242c768..c2be46cdd06f6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IAdditionOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IAdditionOperators.cs @@ -21,6 +21,6 @@ public interface IAdditionOperators // /// The value which is added to . // /// The sum of and . // /// The sum of and is not representable by . - // static abstract TResult operator checked +(TSelf left, TOther right); + static abstract TResult operator checked +(TSelf left, TOther right); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecrementOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecrementOperators.cs index 2071c47886bf4..dd6d80c3d00be 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecrementOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecrementOperators.cs @@ -17,6 +17,6 @@ public interface IDecrementOperators // /// The value to decrement. // /// The result of decrementing . // /// The result of decrementing is not representable by . - // static abstract TSelf operator checked --(TSelf value); + static abstract TSelf operator checked --(TSelf value); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IDivisionOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IDivisionOperators.cs index bd5f8d8c8618c..1c65fa17dd031 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IDivisionOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IDivisionOperators.cs @@ -21,6 +21,6 @@ public interface IDivisionOperators // /// The value which divides . // /// The quotient of divided-by . // /// The quotient of divided-by is not representable by . - // static abstract TResult operator checked /(TSelf left, TOther right); + static abstract TResult operator checked /(TSelf left, TOther right); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IIncrementOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IIncrementOperators.cs index aec1348c0a9c9..538f5c8afe35e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IIncrementOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IIncrementOperators.cs @@ -17,6 +17,6 @@ public interface IIncrementOperators // /// The value to increment. // /// The result of incrementing . // /// The result of incrementing is not representable by . - // static abstract TSelf operator checked ++(TSelf value); + static abstract TSelf operator checked ++(TSelf value); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IMultiplyOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IMultiplyOperators.cs index 97efb32b55445..1596ab6157fe3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IMultiplyOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IMultiplyOperators.cs @@ -21,6 +21,6 @@ public interface IMultiplyOperators // /// The value which multiplies . // /// The product of divided-by . // /// The product of multiplied-by is not representable by . - // static abstract TResult operator checked *(TSelf left, TOther right); + static abstract TResult operator checked *(TSelf left, TOther right); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/ISubtractionOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/ISubtractionOperators.cs index 488b164d462a2..231a7c7eeb583 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/ISubtractionOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/ISubtractionOperators.cs @@ -21,6 +21,6 @@ public interface ISubtractionOperators // /// The value which is subtracted from . // /// The difference of subtracted from . // /// The difference of subtracted from is not representable by . - // static abstract TResult operator checked -(TSelf left, TOther right); + static abstract TResult operator checked -(TSelf left, TOther right); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IUnaryNegationOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IUnaryNegationOperators.cs index fb34b44c20e0e..affe92350ba85 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IUnaryNegationOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IUnaryNegationOperators.cs @@ -18,6 +18,6 @@ public interface IUnaryNegationOperators // /// The value for which to compute its unary negation. // /// The unary negation of . // /// The unary negation of is not representable by . - // static abstract TResult operator checked -(TSelf value); + static abstract TResult operator checked -(TSelf value); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/SByte.cs b/src/libraries/System.Private.CoreLib/src/System/SByte.cs index b8d12a053d0c4..2a65d83b42cec 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SByte.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SByte.cs @@ -315,7 +315,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static sbyte IAdditionOperators.operator +(sbyte left, sbyte right) => (sbyte)(left + right); // /// - // static sbyte IAdditionOperators.operator checked +(sbyte left, sbyte right) => checked((sbyte)(left + right)); + static sbyte IAdditionOperators.operator checked +(sbyte left, sbyte right) => checked((sbyte)(left + right)); // // IAdditiveIdentity @@ -403,7 +403,7 @@ public static sbyte Log2(sbyte value) static sbyte IDecrementOperators.operator --(sbyte value) => --value; // /// - // static sbyte IDecrementOperators.operator checked --(sbyte value) => checked(--value); + static sbyte IDecrementOperators.operator checked --(sbyte value) => checked(--value); // // IDivisionOperators @@ -413,7 +413,7 @@ public static sbyte Log2(sbyte value) static sbyte IDivisionOperators.operator /(sbyte left, sbyte right) => (sbyte)(left / right); // /// - // static sbyte IDivisionOperators.operator checked /(sbyte left, sbyte right) => checked((sbyte)(left / right)); + static sbyte IDivisionOperators.operator checked /(sbyte left, sbyte right) => checked((sbyte)(left / right)); // // IEqualityOperators @@ -433,7 +433,7 @@ public static sbyte Log2(sbyte value) static sbyte IIncrementOperators.operator ++(sbyte value) => ++value; // /// - // static sbyte IIncrementOperators.operator checked ++(sbyte value) => checked(++value); + static sbyte IIncrementOperators.operator checked ++(sbyte value) => checked(++value); // // IMinMaxValue @@ -467,7 +467,7 @@ public static sbyte Log2(sbyte value) static sbyte IMultiplyOperators.operator *(sbyte left, sbyte right) => (sbyte)(left * right); // /// - // static sbyte IMultiplyOperators.operator checked *(sbyte left, sbyte right) => checked((sbyte)(left * right)); + static sbyte IMultiplyOperators.operator checked *(sbyte left, sbyte right) => checked((sbyte)(left * right)); // // INumber @@ -1039,7 +1039,7 @@ public static bool TryCreate(TOther value, out sbyte result) static sbyte ISubtractionOperators.operator -(sbyte left, sbyte right) => (sbyte)(left - right); // /// - // static sbyte ISubtractionOperators.operator checked -(sbyte left, sbyte right) => checked((sbyte)(left - right)); + static sbyte ISubtractionOperators.operator checked -(sbyte left, sbyte right) => checked((sbyte)(left - right)); // // IUnaryNegationOperators @@ -1049,7 +1049,7 @@ public static bool TryCreate(TOther value, out sbyte result) static sbyte IUnaryNegationOperators.operator -(sbyte value) => (sbyte)(-value); // /// - // static sbyte IUnaryNegationOperators.operator checked -(sbyte value) => checked((sbyte)(-value)); + static sbyte IUnaryNegationOperators.operator checked -(sbyte value) => checked((sbyte)(-value)); // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Single.cs b/src/libraries/System.Private.CoreLib/src/System/Single.cs index 7b13ffcd5bcb5..7ffa5f775caf8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Single.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Single.cs @@ -487,7 +487,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static float IAdditionOperators.operator +(float left, float right) => left + right; // /// - // static float IAdditionOperators.operator checked +(float left, float right) => checked(left + right); + static float IAdditionOperators.operator checked +(float left, float right) => left + right; // // IAdditiveIdentity @@ -556,7 +556,7 @@ public static bool IsPow2(float value) static float IDecrementOperators.operator --(float value) => --value; // /// - // static float IDecrementOperators.operator checked --(float value) => checked(--value); + static float IDecrementOperators.operator checked --(float value) => --value; // // IDivisionOperators @@ -566,7 +566,7 @@ public static bool IsPow2(float value) static float IDivisionOperators.operator /(float left, float right) => left / right; // /// - // static float IDivisionOperators.operator checked /(float left, float right) => checked(left / right); + static float IDivisionOperators.operator checked /(float left, float right) => left / right; // // IExponentialFunctions @@ -712,7 +712,7 @@ public static bool IsPow2(float value) static float IIncrementOperators.operator ++(float value) => ++value; // /// - // static float IIncrementOperators.operator checked ++(float value) => checked(++value); + static float IIncrementOperators.operator checked ++(float value) => ++value; // // ILogarithmicFunctions @@ -767,10 +767,10 @@ public static bool IsPow2(float value) // /// - static float IMultiplyOperators.operator *(float left, float right) => (float)(left * right); + static float IMultiplyOperators.operator *(float left, float right) => left * right; // /// - // static float IMultiplyOperators.operator checked *(float left, float right) => checked((float)(left * right)); + static float IMultiplyOperators.operator checked *(float left, float right) => left * right; // // INumber @@ -1148,10 +1148,10 @@ public static bool TryCreate(TOther value, out float result) // /// - static float ISubtractionOperators.operator -(float left, float right) => (float)(left - right); + static float ISubtractionOperators.operator -(float left, float right) => left - right; // /// - // static float ISubtractionOperators.operator checked -(float left, float right) => checked((float)(left - right)); + static float ISubtractionOperators.operator checked -(float left, float right) => left - right; // // ITrigonometricFunctions @@ -1207,10 +1207,10 @@ public static bool TryCreate(TOther value, out float result) // /// - static float IUnaryNegationOperators.operator -(float value) => (float)(-value); + static float IUnaryNegationOperators.operator -(float value) => -value; // /// - // static float IUnaryNegationOperators.operator checked -(float value) => checked((float)(-value)); + static float IUnaryNegationOperators.operator checked -(float value) => -value; // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs b/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs index 6f0f4e9427e6c..2c80da097a9a5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs @@ -932,5 +932,12 @@ public string ToString([StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] stri /// public static bool TryParse(ReadOnlySpan s, IFormatProvider? provider, out TimeOnly result) => TryParse(s, provider, DateTimeStyles.None, out result); + + // + // ISubtractionOperators + // + + // /// + static TimeSpan ISubtractionOperators.operator checked -(TimeOnly left, TimeOnly right) => left - right; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeSpan.cs b/src/libraries/System.Private.CoreLib/src/System/TimeSpan.cs index 68e014b8ac45a..e45c2b3d10540 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeSpan.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeSpan.cs @@ -520,7 +520,7 @@ public bool TryFormat(Span destination, out int charsWritten, [StringSynta // // /// - // static TimeSpan IAdditionOperators.operator checked +(TimeSpan left, TimeSpan right) => checked(left + right); + static TimeSpan IAdditionOperators.operator checked +(TimeSpan left, TimeSpan right) => left + right; // // IAdditiveIdentity @@ -534,10 +534,10 @@ public bool TryFormat(Span destination, out int charsWritten, [StringSynta // // /// - // static TimeSpan IDivisionOperators.operator checked /(TimeSpan left, double right) => checked(left / right); + static TimeSpan IDivisionOperators.operator checked /(TimeSpan left, double right) => left / right; // /// - // static double IDivisionOperators.operator checked /(TimeSpan left, TimeSpan right) => checked(left / right); + static double IDivisionOperators.operator checked /(TimeSpan left, TimeSpan right) => left / right; // // IMinMaxValue @@ -559,20 +559,20 @@ public bool TryFormat(Span destination, out int charsWritten, [StringSynta // // /// - // static TimeSpan IMultiplyOperators.operator checked *(TimeSpan left, double right) => checked(left * right); + static TimeSpan IMultiplyOperators.operator checked *(TimeSpan left, double right) => left * right; // // ISubtractionOperators // // /// - // static TimeSpan ISubtractionOperators.operator checked -(TimeSpan left, TimeSpan right) => checked(left - right); + static TimeSpan ISubtractionOperators.operator checked -(TimeSpan left, TimeSpan right) => left - right; // // IUnaryNegationOperators // // /// - // static TimeSpan IUnaryNegationOperators.operator checked -(TimeSpan value) => checked(-value); + static TimeSpan IUnaryNegationOperators.operator checked -(TimeSpan value) => -value; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt16.cs b/src/libraries/System.Private.CoreLib/src/System/UInt16.cs index 769b477a157ad..8d2f47179248e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt16.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt16.cs @@ -295,7 +295,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ushort IAdditionOperators.operator +(ushort left, ushort right) => (ushort)(left + right); // /// - // static ushort IAdditionOperators.operator checked +(ushort left, ushort right) => checked((ushort)(left + right)); + static ushort IAdditionOperators.operator checked +(ushort left, ushort right) => checked((ushort)(left + right)); // // IAdditiveIdentity @@ -376,7 +376,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ushort IDecrementOperators.operator --(ushort value) => --value; // /// - // static ushort IDecrementOperators.operator checked --(ushort value) => checked(--value); + static ushort IDecrementOperators.operator checked --(ushort value) => checked(--value); // // IDivisionOperators @@ -386,7 +386,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ushort IDivisionOperators.operator /(ushort left, ushort right) => (ushort)(left / right); // /// - // static ushort IDivisionOperators.operator checked /(ushort left, ushort right) => checked((ushort)(left / right)); + static ushort IDivisionOperators.operator checked /(ushort left, ushort right) => checked((ushort)(left / right)); // // IEqualityOperators @@ -406,7 +406,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ushort IIncrementOperators.operator ++(ushort value) => ++value; // /// - // static ushort IIncrementOperators.operator checked ++(ushort value) => checked(++value); + static ushort IIncrementOperators.operator checked ++(ushort value) => checked(++value); // // IMinMaxValue @@ -440,7 +440,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ushort IMultiplyOperators.operator *(ushort left, ushort right) => (ushort)(left * right); // /// - // static ushort IMultiplyOperators.operator checked *(ushort left, ushort right) => checked((ushort)(left * right)); + static ushort IMultiplyOperators.operator checked *(ushort left, ushort right) => checked((ushort)(left * right)); // // INumber @@ -912,7 +912,7 @@ public static bool TryCreate(TOther value, out ushort result) static ushort ISubtractionOperators.operator -(ushort left, ushort right) => (ushort)(left - right); // /// - // static ushort ISubtractionOperators.operator checked -(ushort left, ushort right) => checked((ushort)(left - right)); + static ushort ISubtractionOperators.operator checked -(ushort left, ushort right) => checked((ushort)(left - right)); // // IUnaryNegationOperators @@ -922,7 +922,7 @@ public static bool TryCreate(TOther value, out ushort result) static ushort IUnaryNegationOperators.operator -(ushort value) => (ushort)(-value); // /// - // static ushort IUnaryNegationOperators.operator checked -(ushort value) => checked((ushort)(-value)); + static ushort IUnaryNegationOperators.operator checked -(ushort value) => checked((ushort)(-value)); // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt32.cs b/src/libraries/System.Private.CoreLib/src/System/UInt32.cs index 53b44efce795c..ab341f800e123 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt32.cs @@ -281,7 +281,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static uint IAdditionOperators.operator +(uint left, uint right) => left + right; // /// - // static uint IAdditionOperators.operator checked +(uint left, uint right) => checked(left + right); + static uint IAdditionOperators.operator checked +(uint left, uint right) => checked(left + right); // // IAdditiveIdentity @@ -362,7 +362,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static uint IDecrementOperators.operator --(uint value) => --value; // /// - // static uint IDecrementOperators.operator checked --(uint value) => checked(--value); + static uint IDecrementOperators.operator checked --(uint value) => checked(--value); // // IDivisionOperators @@ -372,7 +372,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static uint IDivisionOperators.operator /(uint left, uint right) => left / right; // /// - // static uint IDivisionOperators.operator checked /(uint left, uint right) => checked(left / right); + static uint IDivisionOperators.operator checked /(uint left, uint right) => checked(left / right); // // IEqualityOperators @@ -392,7 +392,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static uint IIncrementOperators.operator ++(uint value) => ++value; // /// - // static uint IIncrementOperators.operator checked ++(uint value) => checked(++value); + static uint IIncrementOperators.operator checked ++(uint value) => checked(++value); // // IMinMaxValue @@ -426,7 +426,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static uint IMultiplyOperators.operator *(uint left, uint right) => left * right; // /// - // static uint IMultiplyOperators.operator checked *(uint left, uint right) => checked(left * right); + static uint IMultiplyOperators.operator checked *(uint left, uint right) => checked(left * right); // // INumber @@ -888,7 +888,7 @@ public static bool TryCreate(TOther value, out uint result) static uint ISubtractionOperators.operator -(uint left, uint right) => left - right; // /// - // static uint ISubtractionOperators.operator checked -(uint left, uint right) => checked(left - right); + static uint ISubtractionOperators.operator checked -(uint left, uint right) => checked(left - right); // // IUnaryNegationOperators @@ -898,7 +898,7 @@ public static bool TryCreate(TOther value, out uint result) static uint IUnaryNegationOperators.operator -(uint value) => 0u - value; // /// - // static uint IUnaryNegationOperators.operator checked -(uint value) => checked(0u - value); + static uint IUnaryNegationOperators.operator checked -(uint value) => checked(0u - value); // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt64.cs b/src/libraries/System.Private.CoreLib/src/System/UInt64.cs index 5fa7039165cda..eb6c5880043f6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt64.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt64.cs @@ -280,7 +280,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ulong IAdditionOperators.operator +(ulong left, ulong right) => left + right; // /// - // static ulong IAdditionOperators.operator checked +(ulong left, ulong right) => checked(left + right); + static ulong IAdditionOperators.operator checked +(ulong left, ulong right) => checked(left + right); // // IAdditiveIdentity @@ -361,7 +361,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ulong IDecrementOperators.operator --(ulong value) => --value; // /// - // static ulong IDecrementOperators.operator checked --(ulong value) => checked(--value); + static ulong IDecrementOperators.operator checked --(ulong value) => checked(--value); // // IDivisionOperators @@ -371,7 +371,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ulong IDivisionOperators.operator /(ulong left, ulong right) => left / right; // /// - // static ulong IDivisionOperators.operator checked /(ulong left, ulong right) => checked(left / right); + static ulong IDivisionOperators.operator checked /(ulong left, ulong right) => checked(left / right); // // IEqualityOperators @@ -391,7 +391,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ulong IIncrementOperators.operator ++(ulong value) => ++value; // /// - // static ulong IIncrementOperators.operator checked ++(ulong value) => checked(++value); + static ulong IIncrementOperators.operator checked ++(ulong value) => checked(++value); // // IMinMaxValue @@ -425,7 +425,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ulong IMultiplyOperators.operator *(ulong left, ulong right) => left * right; // /// - // static ulong IMultiplyOperators.operator checked *(ulong left, ulong right) => checked(left * right); + static ulong IMultiplyOperators.operator checked *(ulong left, ulong right) => checked(left * right); // // INumber @@ -867,7 +867,7 @@ public static bool TryCreate(TOther value, out ulong result) static ulong ISubtractionOperators.operator -(ulong left, ulong right) => left - right; // /// - // static ulong ISubtractionOperators.operator checked -(ulong left, ulong right) => checked(left - right); + static ulong ISubtractionOperators.operator checked -(ulong left, ulong right) => checked(left - right); // // IUnaryNegationOperators @@ -877,7 +877,7 @@ public static bool TryCreate(TOther value, out ulong result) static ulong IUnaryNegationOperators.operator -(ulong value) => 0UL - value; // /// - // static ulong IUnaryNegationOperators.operator checked -(ulong value) => checked(0UL - value); + static ulong IUnaryNegationOperators.operator checked -(ulong value) => checked(0UL - value); // // IUnaryPlusOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs index 346a18c264f17..544399d466497 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs @@ -263,7 +263,7 @@ public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatPro static nuint IAdditionOperators.operator +(nuint left, nuint right) => (nuint)(left + right); // /// - // static nuint IAdditionOperators.operator checked +(nuint left, nuint right) => checked((nuint)(left + right)); + static nuint IAdditionOperators.operator checked +(nuint left, nuint right) => checked((nuint)(left + right)); // // IAdditiveIdentity @@ -414,7 +414,7 @@ static nuint IBinaryNumber.Log2(nuint value) static nuint IDecrementOperators.operator --(nuint value) => --value; // /// - // static nuint IDecrementOperators.operator checked --(nuint value) => checked(--value); + static nuint IDecrementOperators.operator checked --(nuint value) => checked(--value); // // IDivisionOperators @@ -424,7 +424,7 @@ static nuint IBinaryNumber.Log2(nuint value) static nuint IDivisionOperators.operator /(nuint left, nuint right) => left / right; // /// - // static nuint IDivisionOperators.operator checked /(nuint left, nuint right) => checked(left / right); + static nuint IDivisionOperators.operator checked /(nuint left, nuint right) => checked(left / right); // // IIncrementOperators @@ -434,7 +434,7 @@ static nuint IBinaryNumber.Log2(nuint value) static nuint IIncrementOperators.operator ++(nuint value) => ++value; // /// - // static nuint IIncrementOperators.operator checked ++(nuint value) => checked(++value); + static nuint IIncrementOperators.operator checked ++(nuint value) => checked(++value); // // IMinMaxValue @@ -468,7 +468,7 @@ static nuint IBinaryNumber.Log2(nuint value) static nuint IMultiplyOperators.operator *(nuint left, nuint right) => left * right; // /// - // static nuint IMultiplyOperators.operator checked *(nuint left, nuint right) => checked(left * right); + static nuint IMultiplyOperators.operator checked *(nuint left, nuint right) => checked(left * right); // // INumber @@ -901,7 +901,7 @@ static bool INumber.TryCreate(TOther value, out nuint result) static nuint ISubtractionOperators.operator -(nuint left, nuint right) => left - right; // /// - // static nuint ISubtractionOperators.operator checked -(nuint left, nuint right) => checked(left - right); + static nuint ISubtractionOperators.operator checked -(nuint left, nuint right) => checked(left - right); // // IUnaryNegationOperators @@ -911,7 +911,7 @@ static bool INumber.TryCreate(TOther value, out nuint result) static nuint IUnaryNegationOperators.operator -(nuint value) => (nuint)0 - value; // /// - // static nuint IUnaryNegationOperators.operator checked -(nuint value) => checked((nuint)0 - value); + static nuint IUnaryNegationOperators.operator checked -(nuint value) => checked((nuint)0 - value); // // IUnaryPlusOperators From b974238dd57b8a140c8337e6533f00af1ad780e7 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Wed, 6 Apr 2022 16:27:39 -0700 Subject: [PATCH 2/7] Change SA1000 to be a suggestion until https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3478 can be resolved --- eng/CodeAnalysis.src.globalconfig | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/eng/CodeAnalysis.src.globalconfig b/eng/CodeAnalysis.src.globalconfig index e1a620e8a7fac..831a1b9cfb4ca 100644 --- a/eng/CodeAnalysis.src.globalconfig +++ b/eng/CodeAnalysis.src.globalconfig @@ -866,7 +866,8 @@ dotnet_diagnostic.IL3002.severity = warning dotnet_diagnostic.SA0001.severity = none # SA1000: Spacing around keywords -dotnet_diagnostic.SA1000.severity = warning +# suggestion until https://github.com/DotNetAnalyzers/StyleCopAnalyzers/issues/3478 is resolved +dotnet_diagnostic.SA1000.severity = suggestion # SA1001: Commas should not be preceded by whitespace dotnet_diagnostic.SA1001.severity = warning From ea8bf0ced634ca2ffd2cc456fda03b4db847f172 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Wed, 6 Apr 2022 16:59:09 -0700 Subject: [PATCH 3/7] Regenerating the System.Runtime ref assembly --- .../System.Runtime/ref/System.Runtime.cs | 1881 +++++++++-------- 1 file changed, 1003 insertions(+), 878 deletions(-) diff --git a/src/libraries/System.Runtime/ref/System.Runtime.cs b/src/libraries/System.Runtime/ref/System.Runtime.cs index 2bba22db34324..4b6433a2f3d60 100644 --- a/src/libraries/System.Runtime/ref/System.Runtime.cs +++ b/src/libraries/System.Runtime/ref/System.Runtime.cs @@ -673,15 +673,15 @@ public static partial class BitConverter private readonly bool _dummyPrimitive; public static readonly string FalseString; public static readonly string TrueString; - public int CompareTo(System.Boolean value) { throw null; } + public int CompareTo(bool value) { throw null; } public int CompareTo(object? obj) { throw null; } - public System.Boolean Equals(System.Boolean obj) { throw null; } - public override System.Boolean Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } + public bool Equals(bool obj) { throw null; } + public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static System.Boolean Parse(System.ReadOnlySpan value) { throw null; } - public static System.Boolean Parse(string value) { throw null; } - System.Boolean System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } + public static bool Parse(System.ReadOnlySpan value) { throw null; } + public static bool Parse(string value) { throw null; } + bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider? provider) { throw null; } @@ -698,9 +698,9 @@ public static partial class BitConverter ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } - public System.Boolean TryFormat(System.Span destination, out int charsWritten) { throw null; } - public static System.Boolean TryParse(System.ReadOnlySpan value, out System.Boolean result) { throw null; } - public static System.Boolean TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? value, out System.Boolean result) { throw null; } + public bool TryFormat(System.Span destination, out int charsWritten) { throw null; } + public static bool TryParse(System.ReadOnlySpan value, out bool result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? value, out bool result) { throw null; } } public static partial class Buffer { @@ -724,34 +724,34 @@ public static void SetByte(System.Array array, int index, byte value) { } static byte System.Numerics.IMultiplicativeIdentity.MultiplicativeIdentity { get { throw null; } } static byte System.Numerics.INumberBase.One { get { throw null; } } static byte System.Numerics.INumberBase.Zero { get { throw null; } } - public static System.Byte Clamp(System.Byte value, System.Byte min, System.Byte max) { throw null; } - public int CompareTo(System.Byte value) { throw null; } + public static byte Clamp(byte value, byte min, byte max) { throw null; } + public int CompareTo(byte value) { throw null; } public int CompareTo(object? value) { throw null; } - public static System.Byte CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Byte CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Byte CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static (byte Quotient, byte Remainder) DivRem(System.Byte left, System.Byte right) { throw null; } - public bool Equals(System.Byte obj) { throw null; } + public static byte CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static byte CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static byte CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static (byte Quotient, byte Remainder) DivRem(byte left, byte right) { throw null; } + public bool Equals(byte obj) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static bool IsPow2(System.Byte value) { throw null; } - public static System.Byte LeadingZeroCount(System.Byte value) { throw null; } - public static System.Byte Log2(System.Byte value) { throw null; } - public static System.Byte Max(System.Byte x, System.Byte y) { throw null; } - public static System.Byte Min(System.Byte x, System.Byte y) { throw null; } - public static System.Byte Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } - public static System.Byte Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.Byte Parse(string s) { throw null; } - public static System.Byte Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.Byte Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.Byte Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.Byte PopCount(System.Byte value) { throw null; } - public static System.Byte RotateLeft(System.Byte value, int rotateAmount) { throw null; } - public static System.Byte RotateRight(System.Byte value, int rotateAmount) { throw null; } - public static int Sign(System.Byte value) { throw null; } + public static bool IsPow2(byte value) { throw null; } + public static byte LeadingZeroCount(byte value) { throw null; } + public static byte Log2(byte value) { throw null; } + public static byte Max(byte x, byte y) { throw null; } + public static byte Min(byte x, byte y) { throw null; } + public static byte Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } + public static byte Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static byte Parse(string s) { throw null; } + public static byte Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static byte Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static byte Parse(string s, System.IFormatProvider? provider) { throw null; } + public static byte PopCount(byte value) { throw null; } + public static byte RotateLeft(byte value, int rotateAmount) { throw null; } + public static byte RotateRight(byte value, int rotateAmount) { throw null; } + public static int Sign(byte value) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } - System.Byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } + byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider? provider) { throw null; } decimal System.IConvertible.ToDecimal(System.IFormatProvider? provider) { throw null; } @@ -765,45 +765,52 @@ public static void SetByte(System.Array array, int index, byte value) { } ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } - static System.Byte System.Numerics.IAdditionOperators.operator +(System.Byte left, System.Byte right) { throw null; } - static System.Byte System.Numerics.IBitwiseOperators.operator &(System.Byte left, System.Byte right) { throw null; } - static System.Byte System.Numerics.IBitwiseOperators.operator |(System.Byte left, System.Byte right) { throw null; } - static System.Byte System.Numerics.IBitwiseOperators.operator ^(System.Byte left, System.Byte right) { throw null; } - static System.Byte System.Numerics.IBitwiseOperators.operator ~(System.Byte value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(System.Byte left, System.Byte right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(System.Byte left, System.Byte right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(System.Byte left, System.Byte right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(System.Byte left, System.Byte right) { throw null; } - static System.Byte System.Numerics.IDecrementOperators.operator --(System.Byte value) { throw null; } - static System.Byte System.Numerics.IDivisionOperators.operator /(System.Byte left, System.Byte right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator ==(System.Byte left, System.Byte right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator !=(System.Byte left, System.Byte right) { throw null; } - static System.Byte System.Numerics.IIncrementOperators.operator ++(System.Byte value) { throw null; } - static System.Byte System.Numerics.IModulusOperators.operator %(System.Byte left, System.Byte right) { throw null; } - static System.Byte System.Numerics.IMultiplyOperators.operator *(System.Byte left, System.Byte right) { throw null; } - static System.Byte System.Numerics.INumber.Abs(System.Byte value) { throw null; } - static System.Byte System.Numerics.INumber.CopySign(System.Byte value, System.Byte sign) { throw null; } - static bool System.Numerics.INumber.IsNegative(System.Byte value) { throw null; } - static System.Byte System.Numerics.INumber.MaxMagnitude(System.Byte x, System.Byte y) { throw null; } - static System.Byte System.Numerics.INumber.MinMagnitude(System.Byte x, System.Byte y) { throw null; } - static System.Byte System.Numerics.IShiftOperators.operator <<(System.Byte value, int shiftAmount) { throw null; } - static System.Byte System.Numerics.IShiftOperators.operator >>(System.Byte value, int shiftAmount) { throw null; } - static System.Byte System.Numerics.ISubtractionOperators.operator -(System.Byte left, System.Byte right) { throw null; } - static System.Byte System.Numerics.IUnaryNegationOperators.operator -(System.Byte value) { throw null; } - static System.Byte System.Numerics.IUnaryPlusOperators.operator +(System.Byte value) { throw null; } + static byte System.Numerics.IAdditionOperators.operator +(byte left, byte right) { throw null; } + static byte System.Numerics.IAdditionOperators.operator checked +(byte left, byte right) { throw null; } + static byte System.Numerics.IBitwiseOperators.operator &(byte left, byte right) { throw null; } + static byte System.Numerics.IBitwiseOperators.operator |(byte left, byte right) { throw null; } + static byte System.Numerics.IBitwiseOperators.operator ^(byte left, byte right) { throw null; } + static byte System.Numerics.IBitwiseOperators.operator ~(byte value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(byte left, byte right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(byte left, byte right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(byte left, byte right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(byte left, byte right) { throw null; } + static byte System.Numerics.IDecrementOperators.operator checked --(byte value) { throw null; } + static byte System.Numerics.IDecrementOperators.operator --(byte value) { throw null; } + static byte System.Numerics.IDivisionOperators.operator checked /(byte left, byte right) { throw null; } + static byte System.Numerics.IDivisionOperators.operator /(byte left, byte right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator ==(byte left, byte right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator !=(byte left, byte right) { throw null; } + static byte System.Numerics.IIncrementOperators.operator checked ++(byte value) { throw null; } + static byte System.Numerics.IIncrementOperators.operator ++(byte value) { throw null; } + static byte System.Numerics.IModulusOperators.operator %(byte left, byte right) { throw null; } + static byte System.Numerics.IMultiplyOperators.operator checked *(byte left, byte right) { throw null; } + static byte System.Numerics.IMultiplyOperators.operator *(byte left, byte right) { throw null; } + static byte System.Numerics.INumber.Abs(byte value) { throw null; } + static byte System.Numerics.INumber.CopySign(byte value, byte sign) { throw null; } + static bool System.Numerics.INumber.IsNegative(byte value) { throw null; } + static byte System.Numerics.INumber.MaxMagnitude(byte x, byte y) { throw null; } + static byte System.Numerics.INumber.MinMagnitude(byte x, byte y) { throw null; } + static byte System.Numerics.IShiftOperators.operator <<(byte value, int shiftAmount) { throw null; } + static byte System.Numerics.IShiftOperators.operator >>(byte value, int shiftAmount) { throw null; } + static byte System.Numerics.ISubtractionOperators.operator checked -(byte left, byte right) { throw null; } + static byte System.Numerics.ISubtractionOperators.operator -(byte left, byte right) { throw null; } + static byte System.Numerics.IUnaryNegationOperators.operator checked -(byte value) { throw null; } + static byte System.Numerics.IUnaryNegationOperators.operator -(byte value) { throw null; } + static byte System.Numerics.IUnaryPlusOperators.operator +(byte value) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } - public static System.Byte TrailingZeroCount(System.Byte value) { throw null; } - public static bool TryCreate(TOther value, out System.Byte result) where TOther : System.Numerics.INumber { throw null; } + public static byte TrailingZeroCount(byte value) { throw null; } + public static bool TryCreate(TOther value, out byte result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.Byte result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Byte result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.Byte result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.Byte result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Byte result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.Byte result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out byte result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out byte result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out byte result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out byte result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out byte result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out byte result) { throw null; } } public partial class CannotUnloadAppDomainException : System.SystemException { @@ -823,68 +830,68 @@ public CannotUnloadAppDomainException(string? message, System.Exception? innerEx static char System.Numerics.IMultiplicativeIdentity.MultiplicativeIdentity { get { throw null; } } static char System.Numerics.INumberBase.One { get { throw null; } } static char System.Numerics.INumberBase.Zero { get { throw null; } } - public static System.Char Clamp(System.Char value, System.Char min, System.Char max) { throw null; } - public int CompareTo(System.Char value) { throw null; } + public static char Clamp(char value, char min, char max) { throw null; } + public int CompareTo(char value) { throw null; } public int CompareTo(object? value) { throw null; } public static string ConvertFromUtf32(int utf32) { throw null; } - public static int ConvertToUtf32(System.Char highSurrogate, System.Char lowSurrogate) { throw null; } + public static int ConvertToUtf32(char highSurrogate, char lowSurrogate) { throw null; } public static int ConvertToUtf32(string s, int index) { throw null; } - public static System.Char CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Char CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Char CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static (char Quotient, char Remainder) DivRem(System.Char left, System.Char right) { throw null; } - public bool Equals(System.Char obj) { throw null; } + public static char CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static char CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static char CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static (char Quotient, char Remainder) DivRem(char left, char right) { throw null; } + public bool Equals(char obj) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } public override int GetHashCode() { throw null; } - public static double GetNumericValue(System.Char c) { throw null; } + public static double GetNumericValue(char c) { throw null; } public static double GetNumericValue(string s, int index) { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static System.Globalization.UnicodeCategory GetUnicodeCategory(System.Char c) { throw null; } + public static System.Globalization.UnicodeCategory GetUnicodeCategory(char c) { throw null; } public static System.Globalization.UnicodeCategory GetUnicodeCategory(string s, int index) { throw null; } - public static bool IsAscii(System.Char c) { throw null; } - public static bool IsControl(System.Char c) { throw null; } + public static bool IsAscii(char c) { throw null; } + public static bool IsControl(char c) { throw null; } public static bool IsControl(string s, int index) { throw null; } - public static bool IsDigit(System.Char c) { throw null; } + public static bool IsDigit(char c) { throw null; } public static bool IsDigit(string s, int index) { throw null; } - public static bool IsHighSurrogate(System.Char c) { throw null; } + public static bool IsHighSurrogate(char c) { throw null; } public static bool IsHighSurrogate(string s, int index) { throw null; } - public static bool IsLetter(System.Char c) { throw null; } + public static bool IsLetter(char c) { throw null; } public static bool IsLetter(string s, int index) { throw null; } - public static bool IsLetterOrDigit(System.Char c) { throw null; } + public static bool IsLetterOrDigit(char c) { throw null; } public static bool IsLetterOrDigit(string s, int index) { throw null; } - public static bool IsLower(System.Char c) { throw null; } + public static bool IsLower(char c) { throw null; } public static bool IsLower(string s, int index) { throw null; } - public static bool IsLowSurrogate(System.Char c) { throw null; } + public static bool IsLowSurrogate(char c) { throw null; } public static bool IsLowSurrogate(string s, int index) { throw null; } - public static bool IsNumber(System.Char c) { throw null; } + public static bool IsNumber(char c) { throw null; } public static bool IsNumber(string s, int index) { throw null; } - public static bool IsPow2(System.Char value) { throw null; } - public static bool IsPunctuation(System.Char c) { throw null; } + public static bool IsPow2(char value) { throw null; } + public static bool IsPunctuation(char c) { throw null; } public static bool IsPunctuation(string s, int index) { throw null; } - public static bool IsSeparator(System.Char c) { throw null; } + public static bool IsSeparator(char c) { throw null; } public static bool IsSeparator(string s, int index) { throw null; } - public static bool IsSurrogate(System.Char c) { throw null; } + public static bool IsSurrogate(char c) { throw null; } public static bool IsSurrogate(string s, int index) { throw null; } - public static bool IsSurrogatePair(System.Char highSurrogate, System.Char lowSurrogate) { throw null; } + public static bool IsSurrogatePair(char highSurrogate, char lowSurrogate) { throw null; } public static bool IsSurrogatePair(string s, int index) { throw null; } - public static bool IsSymbol(System.Char c) { throw null; } + public static bool IsSymbol(char c) { throw null; } public static bool IsSymbol(string s, int index) { throw null; } - public static bool IsUpper(System.Char c) { throw null; } + public static bool IsUpper(char c) { throw null; } public static bool IsUpper(string s, int index) { throw null; } - public static bool IsWhiteSpace(System.Char c) { throw null; } + public static bool IsWhiteSpace(char c) { throw null; } public static bool IsWhiteSpace(string s, int index) { throw null; } - public static System.Char LeadingZeroCount(System.Char value) { throw null; } - public static System.Char Log2(System.Char value) { throw null; } - public static System.Char Max(System.Char x, System.Char y) { throw null; } - public static System.Char Min(System.Char x, System.Char y) { throw null; } - public static System.Char Parse(string s) { throw null; } - public static System.Char PopCount(System.Char value) { throw null; } - public static System.Char RotateLeft(System.Char value, int rotateAmount) { throw null; } - public static System.Char RotateRight(System.Char value, int rotateAmount) { throw null; } - public static int Sign(System.Char value) { throw null; } + public static char LeadingZeroCount(char value) { throw null; } + public static char Log2(char value) { throw null; } + public static char Max(char x, char y) { throw null; } + public static char Min(char x, char y) { throw null; } + public static char Parse(string s) { throw null; } + public static char PopCount(char value) { throw null; } + public static char RotateLeft(char value, int rotateAmount) { throw null; } + public static char RotateRight(char value, int rotateAmount) { throw null; } + public static int Sign(char value) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } - System.Char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } + char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider? provider) { throw null; } decimal System.IConvertible.ToDecimal(System.IFormatProvider? provider) { throw null; } double System.IConvertible.ToDouble(System.IFormatProvider? provider) { throw null; } @@ -898,53 +905,60 @@ public CannotUnloadAppDomainException(string? message, System.Exception? innerEx uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } string System.IFormattable.ToString(string? format, System.IFormatProvider? formatProvider) { throw null; } - static System.Char System.IParsable.Parse(string s, System.IFormatProvider? provider) { throw null; } - static bool System.IParsable.TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.Char result) { throw null; } + static char System.IParsable.Parse(string s, System.IFormatProvider? provider) { throw null; } + static bool System.IParsable.TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out char result) { throw null; } bool System.ISpanFormattable.TryFormat(System.Span destination, out int charsWritten, System.ReadOnlySpan format, System.IFormatProvider? provider) { throw null; } - static System.Char System.ISpanParsable.Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - static bool System.ISpanParsable.TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.Char result) { throw null; } - static System.Char System.Numerics.IAdditionOperators.operator +(System.Char left, System.Char right) { throw null; } - static System.Char System.Numerics.IBitwiseOperators.operator &(System.Char left, System.Char right) { throw null; } - static System.Char System.Numerics.IBitwiseOperators.operator |(System.Char left, System.Char right) { throw null; } - static System.Char System.Numerics.IBitwiseOperators.operator ^(System.Char left, System.Char right) { throw null; } - static System.Char System.Numerics.IBitwiseOperators.operator ~(System.Char value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(System.Char left, System.Char right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(System.Char left, System.Char right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(System.Char left, System.Char right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(System.Char left, System.Char right) { throw null; } - static System.Char System.Numerics.IDecrementOperators.operator --(System.Char value) { throw null; } - static System.Char System.Numerics.IDivisionOperators.operator /(System.Char left, System.Char right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator ==(System.Char left, System.Char right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator !=(System.Char left, System.Char right) { throw null; } - static System.Char System.Numerics.IIncrementOperators.operator ++(System.Char value) { throw null; } - static System.Char System.Numerics.IModulusOperators.operator %(System.Char left, System.Char right) { throw null; } - static System.Char System.Numerics.IMultiplyOperators.operator *(System.Char left, System.Char right) { throw null; } - static System.Char System.Numerics.INumber.Abs(System.Char value) { throw null; } - static System.Char System.Numerics.INumber.CopySign(System.Char value, System.Char sign) { throw null; } - static bool System.Numerics.INumber.IsNegative(System.Char value) { throw null; } - static System.Char System.Numerics.INumber.MaxMagnitude(System.Char x, System.Char y) { throw null; } - static System.Char System.Numerics.INumber.MinMagnitude(System.Char x, System.Char y) { throw null; } - static System.Char System.Numerics.INumber.Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - static System.Char System.Numerics.INumber.Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - static bool System.Numerics.INumber.TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Char result) { throw null; } - static bool System.Numerics.INumber.TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Char result) { throw null; } - static System.Char System.Numerics.IShiftOperators.operator <<(System.Char value, int shiftAmount) { throw null; } - static System.Char System.Numerics.IShiftOperators.operator >>(System.Char value, int shiftAmount) { throw null; } - static System.Char System.Numerics.ISubtractionOperators.operator -(System.Char left, System.Char right) { throw null; } - static System.Char System.Numerics.IUnaryNegationOperators.operator -(System.Char value) { throw null; } - static System.Char System.Numerics.IUnaryPlusOperators.operator +(System.Char value) { throw null; } - public static System.Char ToLower(System.Char c) { throw null; } - public static System.Char ToLower(System.Char c, System.Globalization.CultureInfo culture) { throw null; } - public static System.Char ToLowerInvariant(System.Char c) { throw null; } + static char System.ISpanParsable.Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + static bool System.ISpanParsable.TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out char result) { throw null; } + static char System.Numerics.IAdditionOperators.operator +(char left, char right) { throw null; } + static char System.Numerics.IAdditionOperators.operator checked +(char left, char right) { throw null; } + static char System.Numerics.IBitwiseOperators.operator &(char left, char right) { throw null; } + static char System.Numerics.IBitwiseOperators.operator |(char left, char right) { throw null; } + static char System.Numerics.IBitwiseOperators.operator ^(char left, char right) { throw null; } + static char System.Numerics.IBitwiseOperators.operator ~(char value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(char left, char right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(char left, char right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(char left, char right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(char left, char right) { throw null; } + static char System.Numerics.IDecrementOperators.operator checked --(char value) { throw null; } + static char System.Numerics.IDecrementOperators.operator --(char value) { throw null; } + static char System.Numerics.IDivisionOperators.operator checked /(char left, char right) { throw null; } + static char System.Numerics.IDivisionOperators.operator /(char left, char right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator ==(char left, char right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator !=(char left, char right) { throw null; } + static char System.Numerics.IIncrementOperators.operator checked ++(char value) { throw null; } + static char System.Numerics.IIncrementOperators.operator ++(char value) { throw null; } + static char System.Numerics.IModulusOperators.operator %(char left, char right) { throw null; } + static char System.Numerics.IMultiplyOperators.operator checked *(char left, char right) { throw null; } + static char System.Numerics.IMultiplyOperators.operator *(char left, char right) { throw null; } + static char System.Numerics.INumber.Abs(char value) { throw null; } + static char System.Numerics.INumber.CopySign(char value, char sign) { throw null; } + static bool System.Numerics.INumber.IsNegative(char value) { throw null; } + static char System.Numerics.INumber.MaxMagnitude(char x, char y) { throw null; } + static char System.Numerics.INumber.MinMagnitude(char x, char y) { throw null; } + static char System.Numerics.INumber.Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + static char System.Numerics.INumber.Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + static bool System.Numerics.INumber.TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out char result) { throw null; } + static bool System.Numerics.INumber.TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out char result) { throw null; } + static char System.Numerics.IShiftOperators.operator <<(char value, int shiftAmount) { throw null; } + static char System.Numerics.IShiftOperators.operator >>(char value, int shiftAmount) { throw null; } + static char System.Numerics.ISubtractionOperators.operator checked -(char left, char right) { throw null; } + static char System.Numerics.ISubtractionOperators.operator -(char left, char right) { throw null; } + static char System.Numerics.IUnaryNegationOperators.operator checked -(char value) { throw null; } + static char System.Numerics.IUnaryNegationOperators.operator -(char value) { throw null; } + static char System.Numerics.IUnaryPlusOperators.operator +(char value) { throw null; } + public static char ToLower(char c) { throw null; } + public static char ToLower(char c, System.Globalization.CultureInfo culture) { throw null; } + public static char ToLowerInvariant(char c) { throw null; } public override string ToString() { throw null; } - public static string ToString(System.Char c) { throw null; } + public static string ToString(char c) { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } - public static System.Char ToUpper(System.Char c) { throw null; } - public static System.Char ToUpper(System.Char c, System.Globalization.CultureInfo culture) { throw null; } - public static System.Char ToUpperInvariant(System.Char c) { throw null; } - public static System.Char TrailingZeroCount(System.Char value) { throw null; } - public static bool TryCreate(TOther value, out System.Char result) where TOther : System.Numerics.INumber { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.Char result) { throw null; } + public static char ToUpper(char c) { throw null; } + public static char ToUpper(char c, System.Globalization.CultureInfo culture) { throw null; } + public static char ToUpperInvariant(char c) { throw null; } + public static char TrailingZeroCount(char value) { throw null; } + public static bool TryCreate(TOther value, out char result) where TOther : System.Numerics.INumber { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out char result) { throw null; } } public sealed partial class CharEnumerator : System.Collections.Generic.IEnumerator, System.Collections.IEnumerator, System.ICloneable, System.IDisposable { @@ -1599,6 +1613,9 @@ public static partial class Convert ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } + static System.DateTime System.Numerics.IAdditionOperators.operator checked +(System.DateTime left, System.TimeSpan right) { throw null; } + static System.TimeSpan System.Numerics.ISubtractionOperators.operator checked -(System.DateTime left, System.DateTime right) { throw null; } + static System.DateTime System.Numerics.ISubtractionOperators.operator checked -(System.DateTime left, System.TimeSpan right) { throw null; } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public long ToBinary() { throw null; } public long ToFileTime() { throw null; } @@ -1708,6 +1725,9 @@ public enum DateTimeKind public System.TimeSpan Subtract(System.DateTimeOffset value) { throw null; } public System.DateTimeOffset Subtract(System.TimeSpan value) { throw null; } int System.IComparable.CompareTo(object? obj) { throw null; } + static System.DateTimeOffset System.Numerics.IAdditionOperators.operator checked +(System.DateTimeOffset left, System.TimeSpan right) { throw null; } + static System.TimeSpan System.Numerics.ISubtractionOperators.operator checked -(System.DateTimeOffset left, System.DateTimeOffset right) { throw null; } + static System.DateTimeOffset System.Numerics.ISubtractionOperators.operator checked -(System.DateTimeOffset left, System.TimeSpan right) { throw null; } void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object? sender) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public long ToFileTime() { throw null; } @@ -1798,97 +1818,98 @@ public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, S static decimal System.Numerics.INumberBase.One { get { throw null; } } static decimal System.Numerics.INumberBase.Zero { get { throw null; } } static decimal System.Numerics.ISignedNumber.NegativeOne { get { throw null; } } - public static System.Decimal Abs(System.Decimal value) { throw null; } - public static System.Decimal Add(System.Decimal d1, System.Decimal d2) { throw null; } - public static System.Decimal Ceiling(System.Decimal d) { throw null; } - public static System.Decimal Clamp(System.Decimal value, System.Decimal min, System.Decimal max) { throw null; } - public static int Compare(System.Decimal d1, System.Decimal d2) { throw null; } - public int CompareTo(System.Decimal value) { throw null; } + public static decimal Abs(decimal value) { throw null; } + public static decimal Add(decimal d1, decimal d2) { throw null; } + public static decimal Ceiling(decimal d) { throw null; } + public static decimal Clamp(decimal value, decimal min, decimal max) { throw null; } + public static int Compare(decimal d1, decimal d2) { throw null; } + public int CompareTo(decimal value) { throw null; } public int CompareTo(object? value) { throw null; } - public static System.Decimal CopySign(System.Decimal value, System.Decimal sign) { throw null; } - public static System.Decimal CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Decimal CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Decimal CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Decimal Divide(System.Decimal d1, System.Decimal d2) { throw null; } - public bool Equals(System.Decimal value) { throw null; } - public static bool Equals(System.Decimal d1, System.Decimal d2) { throw null; } + public static decimal CopySign(decimal value, decimal sign) { throw null; } + public static decimal CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static decimal CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static decimal CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static decimal Divide(decimal d1, decimal d2) { throw null; } + public bool Equals(decimal value) { throw null; } + public static bool Equals(decimal d1, decimal d2) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? value) { throw null; } - public static System.Decimal Floor(System.Decimal d) { throw null; } - public static System.Decimal FromOACurrency(long cy) { throw null; } - public static int[] GetBits(System.Decimal d) { throw null; } - public static int GetBits(System.Decimal d, System.Span destination) { throw null; } + public static decimal Floor(decimal d) { throw null; } + public static decimal FromOACurrency(long cy) { throw null; } + public static int[] GetBits(decimal d) { throw null; } + public static int GetBits(decimal d, System.Span destination) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static bool IsNegative(System.Decimal value) { throw null; } - public static System.Decimal Max(System.Decimal x, System.Decimal y) { throw null; } - public static System.Decimal MaxMagnitude(System.Decimal x, System.Decimal y) { throw null; } - public static System.Decimal Min(System.Decimal x, System.Decimal y) { throw null; } - public static System.Decimal MinMagnitude(System.Decimal x, System.Decimal y) { throw null; } - public static System.Decimal Multiply(System.Decimal d1, System.Decimal d2) { throw null; } - public static System.Decimal Negate(System.Decimal d) { throw null; } - public static System.Decimal operator +(System.Decimal d1, System.Decimal d2) { throw null; } - public static System.Decimal operator --(System.Decimal d) { throw null; } - public static System.Decimal operator /(System.Decimal d1, System.Decimal d2) { throw null; } - public static bool operator ==(System.Decimal d1, System.Decimal d2) { throw null; } - public static explicit operator byte (System.Decimal value) { throw null; } - public static explicit operator char (System.Decimal value) { throw null; } - public static explicit operator double (System.Decimal value) { throw null; } - public static explicit operator short (System.Decimal value) { throw null; } - public static explicit operator int (System.Decimal value) { throw null; } - public static explicit operator long (System.Decimal value) { throw null; } - [System.CLSCompliantAttribute(false)] - public static explicit operator sbyte (System.Decimal value) { throw null; } - public static explicit operator float (System.Decimal value) { throw null; } - [System.CLSCompliantAttribute(false)] - public static explicit operator ushort (System.Decimal value) { throw null; } - [System.CLSCompliantAttribute(false)] - public static explicit operator uint (System.Decimal value) { throw null; } - [System.CLSCompliantAttribute(false)] - public static explicit operator ulong (System.Decimal value) { throw null; } - public static explicit operator System.Decimal (double value) { throw null; } - public static explicit operator System.Decimal (float value) { throw null; } - public static bool operator >(System.Decimal d1, System.Decimal d2) { throw null; } - public static bool operator >=(System.Decimal d1, System.Decimal d2) { throw null; } - public static implicit operator System.Decimal (byte value) { throw null; } - public static implicit operator System.Decimal (char value) { throw null; } - public static implicit operator System.Decimal (short value) { throw null; } - public static implicit operator System.Decimal (int value) { throw null; } - public static implicit operator System.Decimal (long value) { throw null; } - [System.CLSCompliantAttribute(false)] - public static implicit operator System.Decimal (sbyte value) { throw null; } - [System.CLSCompliantAttribute(false)] - public static implicit operator System.Decimal (ushort value) { throw null; } - [System.CLSCompliantAttribute(false)] - public static implicit operator System.Decimal (uint value) { throw null; } - [System.CLSCompliantAttribute(false)] - public static implicit operator System.Decimal (ulong value) { throw null; } - public static System.Decimal operator ++(System.Decimal d) { throw null; } - public static bool operator !=(System.Decimal d1, System.Decimal d2) { throw null; } - public static bool operator <(System.Decimal d1, System.Decimal d2) { throw null; } - public static bool operator <=(System.Decimal d1, System.Decimal d2) { throw null; } - public static System.Decimal operator %(System.Decimal d1, System.Decimal d2) { throw null; } - public static System.Decimal operator *(System.Decimal d1, System.Decimal d2) { throw null; } - public static System.Decimal operator -(System.Decimal d1, System.Decimal d2) { throw null; } - public static System.Decimal operator -(System.Decimal d) { throw null; } - public static System.Decimal operator +(System.Decimal d) { throw null; } - public static System.Decimal Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Number, System.IFormatProvider? provider = null) { throw null; } - public static System.Decimal Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.Decimal Parse(string s) { throw null; } - public static System.Decimal Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.Decimal Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.Decimal Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.Decimal Remainder(System.Decimal d1, System.Decimal d2) { throw null; } - public static System.Decimal Round(System.Decimal d) { throw null; } - public static System.Decimal Round(System.Decimal d, int decimals) { throw null; } - public static System.Decimal Round(System.Decimal d, int decimals, System.MidpointRounding mode) { throw null; } - public static System.Decimal Round(System.Decimal d, System.MidpointRounding mode) { throw null; } - public static int Sign(System.Decimal d) { throw null; } - public static System.Decimal Subtract(System.Decimal d1, System.Decimal d2) { throw null; } + public static bool IsNegative(decimal value) { throw null; } + public static decimal Max(decimal x, decimal y) { throw null; } + public static decimal MaxMagnitude(decimal x, decimal y) { throw null; } + public static decimal Min(decimal x, decimal y) { throw null; } + public static decimal MinMagnitude(decimal x, decimal y) { throw null; } + public static decimal Multiply(decimal d1, decimal d2) { throw null; } + public static decimal Negate(decimal d) { throw null; } + public static decimal operator +(decimal d1, decimal d2) { throw null; } + public static decimal operator checked *(decimal left, decimal right) { throw null; } + public static decimal operator --(decimal d) { throw null; } + public static decimal operator /(decimal d1, decimal d2) { throw null; } + public static bool operator ==(decimal d1, decimal d2) { throw null; } + public static explicit operator byte (decimal value) { throw null; } + public static explicit operator char (decimal value) { throw null; } + public static explicit operator double (decimal value) { throw null; } + public static explicit operator short (decimal value) { throw null; } + public static explicit operator int (decimal value) { throw null; } + public static explicit operator long (decimal value) { throw null; } + [System.CLSCompliantAttribute(false)] + public static explicit operator sbyte (decimal value) { throw null; } + public static explicit operator float (decimal value) { throw null; } + [System.CLSCompliantAttribute(false)] + public static explicit operator ushort (decimal value) { throw null; } + [System.CLSCompliantAttribute(false)] + public static explicit operator uint (decimal value) { throw null; } + [System.CLSCompliantAttribute(false)] + public static explicit operator ulong (decimal value) { throw null; } + public static explicit operator decimal (double value) { throw null; } + public static explicit operator decimal (float value) { throw null; } + public static bool operator >(decimal d1, decimal d2) { throw null; } + public static bool operator >=(decimal d1, decimal d2) { throw null; } + public static implicit operator decimal (byte value) { throw null; } + public static implicit operator decimal (char value) { throw null; } + public static implicit operator decimal (short value) { throw null; } + public static implicit operator decimal (int value) { throw null; } + public static implicit operator decimal (long value) { throw null; } + [System.CLSCompliantAttribute(false)] + public static implicit operator decimal (sbyte value) { throw null; } + [System.CLSCompliantAttribute(false)] + public static implicit operator decimal (ushort value) { throw null; } + [System.CLSCompliantAttribute(false)] + public static implicit operator decimal (uint value) { throw null; } + [System.CLSCompliantAttribute(false)] + public static implicit operator decimal (ulong value) { throw null; } + public static decimal operator ++(decimal d) { throw null; } + public static bool operator !=(decimal d1, decimal d2) { throw null; } + public static bool operator <(decimal d1, decimal d2) { throw null; } + public static bool operator <=(decimal d1, decimal d2) { throw null; } + public static decimal operator %(decimal d1, decimal d2) { throw null; } + public static decimal operator *(decimal d1, decimal d2) { throw null; } + public static decimal operator -(decimal d1, decimal d2) { throw null; } + public static decimal operator -(decimal d) { throw null; } + public static decimal operator +(decimal d) { throw null; } + public static decimal Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Number, System.IFormatProvider? provider = null) { throw null; } + public static decimal Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static decimal Parse(string s) { throw null; } + public static decimal Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static decimal Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static decimal Parse(string s, System.IFormatProvider? provider) { throw null; } + public static decimal Remainder(decimal d1, decimal d2) { throw null; } + public static decimal Round(decimal d) { throw null; } + public static decimal Round(decimal d, int decimals) { throw null; } + public static decimal Round(decimal d, int decimals, System.MidpointRounding mode) { throw null; } + public static decimal Round(decimal d, System.MidpointRounding mode) { throw null; } + public static int Sign(decimal d) { throw null; } + public static decimal Subtract(decimal d1, decimal d2) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider? provider) { throw null; } - System.Decimal System.IConvertible.ToDecimal(System.IFormatProvider? provider) { throw null; } + decimal System.IConvertible.ToDecimal(System.IFormatProvider? provider) { throw null; } double System.IConvertible.ToDouble(System.IFormatProvider? provider) { throw null; } short System.IConvertible.ToInt16(System.IFormatProvider? provider) { throw null; } int System.IConvertible.ToInt32(System.IFormatProvider? provider) { throw null; } @@ -1899,37 +1920,43 @@ public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, S ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } + static decimal System.Numerics.IAdditionOperators.operator checked +(decimal left, decimal right) { throw null; } + static decimal System.Numerics.IDecrementOperators.operator checked --(decimal value) { throw null; } + static decimal System.Numerics.IDivisionOperators.operator checked /(decimal left, decimal right) { throw null; } + static decimal System.Numerics.IIncrementOperators.operator checked ++(decimal value) { throw null; } + static decimal System.Numerics.ISubtractionOperators.operator checked -(decimal left, decimal right) { throw null; } + static decimal System.Numerics.IUnaryNegationOperators.operator checked -(decimal value) { throw null; } void System.Runtime.Serialization.IDeserializationCallback.OnDeserialization(object? sender) { } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } - public static byte ToByte(System.Decimal value) { throw null; } - public static double ToDouble(System.Decimal d) { throw null; } - public static short ToInt16(System.Decimal value) { throw null; } - public static int ToInt32(System.Decimal d) { throw null; } - public static long ToInt64(System.Decimal d) { throw null; } - public static long ToOACurrency(System.Decimal value) { throw null; } - [System.CLSCompliantAttribute(false)] - public static sbyte ToSByte(System.Decimal value) { throw null; } - public static float ToSingle(System.Decimal d) { throw null; } + public static byte ToByte(decimal value) { throw null; } + public static double ToDouble(decimal d) { throw null; } + public static short ToInt16(decimal value) { throw null; } + public static int ToInt32(decimal d) { throw null; } + public static long ToInt64(decimal d) { throw null; } + public static long ToOACurrency(decimal value) { throw null; } + [System.CLSCompliantAttribute(false)] + public static sbyte ToSByte(decimal value) { throw null; } + public static float ToSingle(decimal d) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } [System.CLSCompliantAttribute(false)] - public static ushort ToUInt16(System.Decimal value) { throw null; } + public static ushort ToUInt16(decimal value) { throw null; } [System.CLSCompliantAttribute(false)] - public static uint ToUInt32(System.Decimal d) { throw null; } + public static uint ToUInt32(decimal d) { throw null; } [System.CLSCompliantAttribute(false)] - public static ulong ToUInt64(System.Decimal d) { throw null; } - public static System.Decimal Truncate(System.Decimal d) { throw null; } - public static bool TryCreate(TOther value, out System.Decimal result) where TOther : System.Numerics.INumber { throw null; } + public static ulong ToUInt64(decimal d) { throw null; } + public static decimal Truncate(decimal d) { throw null; } + public static bool TryCreate(TOther value, out decimal result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryGetBits(System.Decimal d, System.Span destination, out int valuesWritten) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.Decimal result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Decimal result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.Decimal result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.Decimal result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Decimal result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.Decimal result) { throw null; } + public static bool TryGetBits(decimal d, System.Span destination, out int valuesWritten) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out decimal result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out decimal result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out decimal result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out decimal result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out decimal result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out decimal result) { throw null; } } public abstract partial class Delegate : System.ICloneable, System.Runtime.Serialization.ISerializable { @@ -2005,84 +2032,84 @@ public DivideByZeroException(string? message, System.Exception? innerException) static double System.Numerics.INumberBase.One { get { throw null; } } static double System.Numerics.INumberBase.Zero { get { throw null; } } static double System.Numerics.ISignedNumber.NegativeOne { get { throw null; } } - public static System.Double Abs(System.Double value) { throw null; } - public static System.Double Acos(System.Double x) { throw null; } - public static System.Double Acosh(System.Double x) { throw null; } - public static System.Double Asin(System.Double x) { throw null; } - public static System.Double Asinh(System.Double x) { throw null; } - public static System.Double Atan(System.Double x) { throw null; } - public static System.Double Atan2(System.Double y, System.Double x) { throw null; } - public static System.Double Atanh(System.Double x) { throw null; } - public static System.Double BitDecrement(System.Double x) { throw null; } - public static System.Double BitIncrement(System.Double x) { throw null; } - public static System.Double Cbrt(System.Double x) { throw null; } - public static System.Double Ceiling(System.Double x) { throw null; } - public static System.Double Clamp(System.Double value, System.Double min, System.Double max) { throw null; } - public int CompareTo(System.Double value) { throw null; } + public static double Abs(double value) { throw null; } + public static double Acos(double x) { throw null; } + public static double Acosh(double x) { throw null; } + public static double Asin(double x) { throw null; } + public static double Asinh(double x) { throw null; } + public static double Atan(double x) { throw null; } + public static double Atan2(double y, double x) { throw null; } + public static double Atanh(double x) { throw null; } + public static double BitDecrement(double x) { throw null; } + public static double BitIncrement(double x) { throw null; } + public static double Cbrt(double x) { throw null; } + public static double Ceiling(double x) { throw null; } + public static double Clamp(double value, double min, double max) { throw null; } + public int CompareTo(double value) { throw null; } public int CompareTo(object? value) { throw null; } - public static System.Double CopySign(System.Double x, System.Double y) { throw null; } - public static System.Double Cos(System.Double x) { throw null; } - public static System.Double Cosh(System.Double x) { throw null; } - public static System.Double CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Double CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Double CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public bool Equals(System.Double obj) { throw null; } + public static double CopySign(double x, double y) { throw null; } + public static double Cos(double x) { throw null; } + public static double Cosh(double x) { throw null; } + public static double CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static double CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static double CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public bool Equals(double obj) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } - public static System.Double Exp(System.Double x) { throw null; } - public static System.Double Floor(System.Double x) { throw null; } - public static System.Double FusedMultiplyAdd(System.Double left, System.Double right, System.Double addend) { throw null; } + public static double Exp(double x) { throw null; } + public static double Floor(double x) { throw null; } + public static double FusedMultiplyAdd(double left, double right, double addend) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static System.Double Ieee754Remainder(System.Double left, System.Double right) { throw null; } - public static int ILogB(System.Double x) { throw null; } - public static bool IsFinite(System.Double d) { throw null; } - public static bool IsInfinity(System.Double d) { throw null; } - public static bool IsNaN(System.Double d) { throw null; } - public static bool IsNegative(System.Double d) { throw null; } - public static bool IsNegativeInfinity(System.Double d) { throw null; } - public static bool IsNormal(System.Double d) { throw null; } - public static bool IsPositiveInfinity(System.Double d) { throw null; } - public static bool IsPow2(System.Double value) { throw null; } - public static bool IsSubnormal(System.Double d) { throw null; } - public static System.Double Log(System.Double x) { throw null; } - public static System.Double Log(System.Double x, System.Double newBase) { throw null; } - public static System.Double Log10(System.Double x) { throw null; } - public static System.Double Log2(System.Double value) { throw null; } - public static System.Double Max(System.Double x, System.Double y) { throw null; } - public static System.Double MaxMagnitude(System.Double x, System.Double y) { throw null; } - public static System.Double Min(System.Double x, System.Double y) { throw null; } - public static System.Double MinMagnitude(System.Double x, System.Double y) { throw null; } - public static bool operator ==(System.Double left, System.Double right) { throw null; } - public static bool operator >(System.Double left, System.Double right) { throw null; } - public static bool operator >=(System.Double left, System.Double right) { throw null; } - public static bool operator !=(System.Double left, System.Double right) { throw null; } - public static bool operator <(System.Double left, System.Double right) { throw null; } - public static bool operator <=(System.Double left, System.Double right) { throw null; } - public static System.Double Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.AllowDecimalPoint | System.Globalization.NumberStyles.AllowExponent | System.Globalization.NumberStyles.AllowLeadingSign | System.Globalization.NumberStyles.AllowLeadingWhite | System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowTrailingWhite, System.IFormatProvider? provider = null) { throw null; } - public static System.Double Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.Double Parse(string s) { throw null; } - public static System.Double Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.Double Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.Double Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.Double Pow(System.Double x, System.Double y) { throw null; } - public static System.Double ReciprocalEstimate(System.Double x) { throw null; } - public static System.Double ReciprocalSqrtEstimate(System.Double x) { throw null; } - public static System.Double Round(System.Double x) { throw null; } - public static System.Double Round(System.Double x, int digits) { throw null; } - public static System.Double Round(System.Double x, int digits, System.MidpointRounding mode) { throw null; } - public static System.Double Round(System.Double x, System.MidpointRounding mode) { throw null; } - public static System.Double ScaleB(System.Double x, int n) { throw null; } - public static int Sign(System.Double value) { throw null; } - public static System.Double Sin(System.Double x) { throw null; } - public static (System.Double Sin, System.Double Cos) SinCos(System.Double x) { throw null; } - public static System.Double Sinh(System.Double x) { throw null; } - public static System.Double Sqrt(System.Double x) { throw null; } + public static double Ieee754Remainder(double left, double right) { throw null; } + public static int ILogB(double x) { throw null; } + public static bool IsFinite(double d) { throw null; } + public static bool IsInfinity(double d) { throw null; } + public static bool IsNaN(double d) { throw null; } + public static bool IsNegative(double d) { throw null; } + public static bool IsNegativeInfinity(double d) { throw null; } + public static bool IsNormal(double d) { throw null; } + public static bool IsPositiveInfinity(double d) { throw null; } + public static bool IsPow2(double value) { throw null; } + public static bool IsSubnormal(double d) { throw null; } + public static double Log(double x) { throw null; } + public static double Log(double x, double newBase) { throw null; } + public static double Log10(double x) { throw null; } + public static double Log2(double value) { throw null; } + public static double Max(double x, double y) { throw null; } + public static double MaxMagnitude(double x, double y) { throw null; } + public static double Min(double x, double y) { throw null; } + public static double MinMagnitude(double x, double y) { throw null; } + public static bool operator ==(double left, double right) { throw null; } + public static bool operator >(double left, double right) { throw null; } + public static bool operator >=(double left, double right) { throw null; } + public static bool operator !=(double left, double right) { throw null; } + public static bool operator <(double left, double right) { throw null; } + public static bool operator <=(double left, double right) { throw null; } + public static double Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.AllowDecimalPoint | System.Globalization.NumberStyles.AllowExponent | System.Globalization.NumberStyles.AllowLeadingSign | System.Globalization.NumberStyles.AllowLeadingWhite | System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowTrailingWhite, System.IFormatProvider? provider = null) { throw null; } + public static double Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static double Parse(string s) { throw null; } + public static double Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static double Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static double Parse(string s, System.IFormatProvider? provider) { throw null; } + public static double Pow(double x, double y) { throw null; } + public static double ReciprocalEstimate(double x) { throw null; } + public static double ReciprocalSqrtEstimate(double x) { throw null; } + public static double Round(double x) { throw null; } + public static double Round(double x, int digits) { throw null; } + public static double Round(double x, int digits, System.MidpointRounding mode) { throw null; } + public static double Round(double x, System.MidpointRounding mode) { throw null; } + public static double ScaleB(double x, int n) { throw null; } + public static int Sign(double value) { throw null; } + public static double Sin(double x) { throw null; } + public static (double Sin, double Cos) SinCos(double x) { throw null; } + public static double Sinh(double x) { throw null; } + public static double Sqrt(double x) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider? provider) { throw null; } decimal System.IConvertible.ToDecimal(System.IFormatProvider? provider) { throw null; } - System.Double System.IConvertible.ToDouble(System.IFormatProvider? provider) { throw null; } + double System.IConvertible.ToDouble(System.IFormatProvider? provider) { throw null; } short System.IConvertible.ToInt16(System.IFormatProvider? provider) { throw null; } int System.IConvertible.ToInt32(System.IFormatProvider? provider) { throw null; } long System.IConvertible.ToInt64(System.IFormatProvider? provider) { throw null; } @@ -2092,34 +2119,41 @@ public DivideByZeroException(string? message, System.Exception? innerException) ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } - static System.Double System.Numerics.IAdditionOperators.operator +(System.Double left, System.Double right) { throw null; } - static System.Double System.Numerics.IBitwiseOperators.operator &(System.Double left, System.Double right) { throw null; } - static System.Double System.Numerics.IBitwiseOperators.operator |(System.Double left, System.Double right) { throw null; } - static System.Double System.Numerics.IBitwiseOperators.operator ^(System.Double left, System.Double right) { throw null; } - static System.Double System.Numerics.IBitwiseOperators.operator ~(System.Double value) { throw null; } - static System.Double System.Numerics.IDecrementOperators.operator --(System.Double value) { throw null; } - static System.Double System.Numerics.IDivisionOperators.operator /(System.Double left, System.Double right) { throw null; } - static System.Double System.Numerics.IIncrementOperators.operator ++(System.Double value) { throw null; } - static System.Double System.Numerics.IModulusOperators.operator %(System.Double left, System.Double right) { throw null; } - static System.Double System.Numerics.IMultiplyOperators.operator *(System.Double left, System.Double right) { throw null; } - static System.Double System.Numerics.ISubtractionOperators.operator -(System.Double left, System.Double right) { throw null; } - static System.Double System.Numerics.IUnaryNegationOperators.operator -(System.Double value) { throw null; } - static System.Double System.Numerics.IUnaryPlusOperators.operator +(System.Double value) { throw null; } - public static System.Double Tan(System.Double x) { throw null; } - public static System.Double Tanh(System.Double x) { throw null; } + static double System.Numerics.IAdditionOperators.operator +(double left, double right) { throw null; } + static double System.Numerics.IAdditionOperators.operator checked +(double left, double right) { throw null; } + static double System.Numerics.IBitwiseOperators.operator &(double left, double right) { throw null; } + static double System.Numerics.IBitwiseOperators.operator |(double left, double right) { throw null; } + static double System.Numerics.IBitwiseOperators.operator ^(double left, double right) { throw null; } + static double System.Numerics.IBitwiseOperators.operator ~(double value) { throw null; } + static double System.Numerics.IDecrementOperators.operator checked --(double value) { throw null; } + static double System.Numerics.IDecrementOperators.operator --(double value) { throw null; } + static double System.Numerics.IDivisionOperators.operator checked /(double left, double right) { throw null; } + static double System.Numerics.IDivisionOperators.operator /(double left, double right) { throw null; } + static double System.Numerics.IIncrementOperators.operator checked ++(double value) { throw null; } + static double System.Numerics.IIncrementOperators.operator ++(double value) { throw null; } + static double System.Numerics.IModulusOperators.operator %(double left, double right) { throw null; } + static double System.Numerics.IMultiplyOperators.operator checked *(double left, double right) { throw null; } + static double System.Numerics.IMultiplyOperators.operator *(double left, double right) { throw null; } + static double System.Numerics.ISubtractionOperators.operator checked -(double left, double right) { throw null; } + static double System.Numerics.ISubtractionOperators.operator -(double left, double right) { throw null; } + static double System.Numerics.IUnaryNegationOperators.operator checked -(double value) { throw null; } + static double System.Numerics.IUnaryNegationOperators.operator -(double value) { throw null; } + static double System.Numerics.IUnaryPlusOperators.operator +(double value) { throw null; } + public static double Tan(double x) { throw null; } + public static double Tanh(double x) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } - public static System.Double Truncate(System.Double x) { throw null; } - public static bool TryCreate(TOther value, out System.Double result) where TOther : System.Numerics.INumber { throw null; } + public static double Truncate(double x) { throw null; } + public static bool TryCreate(TOther value, out double result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.Double result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Double result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.Double result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.Double result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Double result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.Double result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out double result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out double result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out double result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out double result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out double result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out double result) { throw null; } } public partial class DuplicateWaitObjectException : System.ArgumentException { @@ -2661,10 +2695,17 @@ public GopherStyleUriParser() { } public static (System.Half Sin, System.Half Cos) SinCos(System.Half x) { throw null; } public static System.Half Sinh(System.Half x) { throw null; } public static System.Half Sqrt(System.Half x) { throw null; } - static System.Half System.Numerics.IBitwiseOperators.operator &(System.Half left, System.Half right) { throw null; } - static System.Half System.Numerics.IBitwiseOperators.operator |(System.Half left, System.Half right) { throw null; } - static System.Half System.Numerics.IBitwiseOperators.operator ^(System.Half left, System.Half right) { throw null; } - static System.Half System.Numerics.IBitwiseOperators.operator ~(System.Half value) { throw null; } + static System.Half System.Numerics.IAdditionOperators.operator checked +(System.Half left, System.Half right) { throw null; } + static System.Half System.Numerics.IBitwiseOperators.operator &(System.Half left, System.Half right) { throw null; } + static System.Half System.Numerics.IBitwiseOperators.operator |(System.Half left, System.Half right) { throw null; } + static System.Half System.Numerics.IBitwiseOperators.operator ^(System.Half left, System.Half right) { throw null; } + static System.Half System.Numerics.IBitwiseOperators.operator ~(System.Half value) { throw null; } + static System.Half System.Numerics.IDecrementOperators.operator checked --(System.Half value) { throw null; } + static System.Half System.Numerics.IDivisionOperators.operator checked /(System.Half left, System.Half right) { throw null; } + static System.Half System.Numerics.IIncrementOperators.operator checked ++(System.Half value) { throw null; } + static System.Half System.Numerics.IMultiplyOperators.operator checked *(System.Half left, System.Half right) { throw null; } + static System.Half System.Numerics.ISubtractionOperators.operator checked -(System.Half left, System.Half right) { throw null; } + static System.Half System.Numerics.IUnaryNegationOperators.operator checked -(System.Half value) { throw null; } public static System.Half Tan(System.Half x) { throw null; } public static System.Half Tanh(System.Half x) { throw null; } public override string ToString() { throw null; } @@ -2818,44 +2859,44 @@ public InsufficientMemoryException(string? message, System.Exception? innerExcep static short System.Numerics.INumberBase.One { get { throw null; } } static short System.Numerics.INumberBase.Zero { get { throw null; } } static short System.Numerics.ISignedNumber.NegativeOne { get { throw null; } } - public static System.Int16 Abs(System.Int16 value) { throw null; } - public static System.Int16 Clamp(System.Int16 value, System.Int16 min, System.Int16 max) { throw null; } - public int CompareTo(System.Int16 value) { throw null; } + public static short Abs(short value) { throw null; } + public static short Clamp(short value, short min, short max) { throw null; } + public int CompareTo(short value) { throw null; } public int CompareTo(object? value) { throw null; } - public static System.Int16 CopySign(System.Int16 value, System.Int16 sign) { throw null; } - public static System.Int16 CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Int16 CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Int16 CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static (short Quotient, short Remainder) DivRem(System.Int16 left, System.Int16 right) { throw null; } - public bool Equals(System.Int16 obj) { throw null; } + public static short CopySign(short value, short sign) { throw null; } + public static short CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static short CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static short CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static (short Quotient, short Remainder) DivRem(short left, short right) { throw null; } + public bool Equals(short obj) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static bool IsNegative(System.Int16 value) { throw null; } - public static bool IsPow2(System.Int16 value) { throw null; } - public static System.Int16 LeadingZeroCount(System.Int16 value) { throw null; } - public static System.Int16 Log2(System.Int16 value) { throw null; } - public static System.Int16 Max(System.Int16 x, System.Int16 y) { throw null; } - public static System.Int16 MaxMagnitude(System.Int16 x, System.Int16 y) { throw null; } - public static System.Int16 Min(System.Int16 x, System.Int16 y) { throw null; } - public static System.Int16 MinMagnitude(System.Int16 x, System.Int16 y) { throw null; } - public static System.Int16 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } - public static System.Int16 Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.Int16 Parse(string s) { throw null; } - public static System.Int16 Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.Int16 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.Int16 Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.Int16 PopCount(System.Int16 value) { throw null; } - public static System.Int16 RotateLeft(System.Int16 value, int rotateAmount) { throw null; } - public static System.Int16 RotateRight(System.Int16 value, int rotateAmount) { throw null; } - public static int Sign(System.Int16 value) { throw null; } + public static bool IsNegative(short value) { throw null; } + public static bool IsPow2(short value) { throw null; } + public static short LeadingZeroCount(short value) { throw null; } + public static short Log2(short value) { throw null; } + public static short Max(short x, short y) { throw null; } + public static short MaxMagnitude(short x, short y) { throw null; } + public static short Min(short x, short y) { throw null; } + public static short MinMagnitude(short x, short y) { throw null; } + public static short Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } + public static short Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static short Parse(string s) { throw null; } + public static short Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static short Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static short Parse(string s, System.IFormatProvider? provider) { throw null; } + public static short PopCount(short value) { throw null; } + public static short RotateLeft(short value, int rotateAmount) { throw null; } + public static short RotateRight(short value, int rotateAmount) { throw null; } + public static int Sign(short value) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } System.DateTime System.IConvertible.ToDateTime(System.IFormatProvider? provider) { throw null; } decimal System.IConvertible.ToDecimal(System.IFormatProvider? provider) { throw null; } double System.IConvertible.ToDouble(System.IFormatProvider? provider) { throw null; } - System.Int16 System.IConvertible.ToInt16(System.IFormatProvider? provider) { throw null; } + short System.IConvertible.ToInt16(System.IFormatProvider? provider) { throw null; } int System.IConvertible.ToInt32(System.IFormatProvider? provider) { throw null; } long System.IConvertible.ToInt64(System.IFormatProvider? provider) { throw null; } sbyte System.IConvertible.ToSByte(System.IFormatProvider? provider) { throw null; } @@ -2864,40 +2905,47 @@ public InsufficientMemoryException(string? message, System.Exception? innerExcep ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } - static System.Int16 System.Numerics.IAdditionOperators.operator +(System.Int16 left, System.Int16 right) { throw null; } - static System.Int16 System.Numerics.IBitwiseOperators.operator &(System.Int16 left, System.Int16 right) { throw null; } - static System.Int16 System.Numerics.IBitwiseOperators.operator |(System.Int16 left, System.Int16 right) { throw null; } - static System.Int16 System.Numerics.IBitwiseOperators.operator ^(System.Int16 left, System.Int16 right) { throw null; } - static System.Int16 System.Numerics.IBitwiseOperators.operator ~(System.Int16 value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(System.Int16 left, System.Int16 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(System.Int16 left, System.Int16 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(System.Int16 left, System.Int16 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(System.Int16 left, System.Int16 right) { throw null; } - static System.Int16 System.Numerics.IDecrementOperators.operator --(System.Int16 value) { throw null; } - static System.Int16 System.Numerics.IDivisionOperators.operator /(System.Int16 left, System.Int16 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator ==(System.Int16 left, System.Int16 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator !=(System.Int16 left, System.Int16 right) { throw null; } - static System.Int16 System.Numerics.IIncrementOperators.operator ++(System.Int16 value) { throw null; } - static System.Int16 System.Numerics.IModulusOperators.operator %(System.Int16 left, System.Int16 right) { throw null; } - static System.Int16 System.Numerics.IMultiplyOperators.operator *(System.Int16 left, System.Int16 right) { throw null; } - static System.Int16 System.Numerics.IShiftOperators.operator <<(System.Int16 value, int shiftAmount) { throw null; } - static System.Int16 System.Numerics.IShiftOperators.operator >>(System.Int16 value, int shiftAmount) { throw null; } - static System.Int16 System.Numerics.ISubtractionOperators.operator -(System.Int16 left, System.Int16 right) { throw null; } - static System.Int16 System.Numerics.IUnaryNegationOperators.operator -(System.Int16 value) { throw null; } - static System.Int16 System.Numerics.IUnaryPlusOperators.operator +(System.Int16 value) { throw null; } + static short System.Numerics.IAdditionOperators.operator +(short left, short right) { throw null; } + static short System.Numerics.IAdditionOperators.operator checked +(short left, short right) { throw null; } + static short System.Numerics.IBitwiseOperators.operator &(short left, short right) { throw null; } + static short System.Numerics.IBitwiseOperators.operator |(short left, short right) { throw null; } + static short System.Numerics.IBitwiseOperators.operator ^(short left, short right) { throw null; } + static short System.Numerics.IBitwiseOperators.operator ~(short value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(short left, short right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(short left, short right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(short left, short right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(short left, short right) { throw null; } + static short System.Numerics.IDecrementOperators.operator checked --(short value) { throw null; } + static short System.Numerics.IDecrementOperators.operator --(short value) { throw null; } + static short System.Numerics.IDivisionOperators.operator checked /(short left, short right) { throw null; } + static short System.Numerics.IDivisionOperators.operator /(short left, short right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator ==(short left, short right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator !=(short left, short right) { throw null; } + static short System.Numerics.IIncrementOperators.operator checked ++(short value) { throw null; } + static short System.Numerics.IIncrementOperators.operator ++(short value) { throw null; } + static short System.Numerics.IModulusOperators.operator %(short left, short right) { throw null; } + static short System.Numerics.IMultiplyOperators.operator checked *(short left, short right) { throw null; } + static short System.Numerics.IMultiplyOperators.operator *(short left, short right) { throw null; } + static short System.Numerics.IShiftOperators.operator <<(short value, int shiftAmount) { throw null; } + static short System.Numerics.IShiftOperators.operator >>(short value, int shiftAmount) { throw null; } + static short System.Numerics.ISubtractionOperators.operator checked -(short left, short right) { throw null; } + static short System.Numerics.ISubtractionOperators.operator -(short left, short right) { throw null; } + static short System.Numerics.IUnaryNegationOperators.operator checked -(short value) { throw null; } + static short System.Numerics.IUnaryNegationOperators.operator -(short value) { throw null; } + static short System.Numerics.IUnaryPlusOperators.operator +(short value) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } - public static System.Int16 TrailingZeroCount(System.Int16 value) { throw null; } - public static bool TryCreate(TOther value, out System.Int16 result) where TOther : System.Numerics.INumber { throw null; } + public static short TrailingZeroCount(short value) { throw null; } + public static bool TryCreate(TOther value, out short result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Int16 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.Int16 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.Int16 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Int16 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.Int16 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.Int16 result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out short result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out short result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out short result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out short result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out short result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out short result) { throw null; } } public readonly partial struct Int32 : System.IComparable, System.IComparable, System.IConvertible, System.IEquatable, System.IFormattable, System.IParsable, System.ISpanFormattable, System.ISpanParsable, System.Numerics.IAdditionOperators, System.Numerics.IAdditiveIdentity, System.Numerics.IBinaryInteger, System.Numerics.IBinaryNumber, System.Numerics.IBitwiseOperators, System.Numerics.IComparisonOperators, System.Numerics.IDecrementOperators, System.Numerics.IDivisionOperators, System.Numerics.IEqualityOperators, System.Numerics.IIncrementOperators, System.Numerics.IMinMaxValue, System.Numerics.IModulusOperators, System.Numerics.IMultiplicativeIdentity, System.Numerics.IMultiplyOperators, System.Numerics.INumber, System.Numerics.INumberBase, System.Numerics.IShiftOperators, System.Numerics.ISignedNumber, System.Numerics.ISubtractionOperators, System.Numerics.IUnaryNegationOperators, System.Numerics.IUnaryPlusOperators { @@ -2911,37 +2959,37 @@ public InsufficientMemoryException(string? message, System.Exception? innerExcep static int System.Numerics.INumberBase.One { get { throw null; } } static int System.Numerics.INumberBase.Zero { get { throw null; } } static int System.Numerics.ISignedNumber.NegativeOne { get { throw null; } } - public static System.Int32 Abs(System.Int32 value) { throw null; } - public static System.Int32 Clamp(System.Int32 value, System.Int32 min, System.Int32 max) { throw null; } - public System.Int32 CompareTo(System.Int32 value) { throw null; } - public System.Int32 CompareTo(object? value) { throw null; } - public static System.Int32 CopySign(System.Int32 value, System.Int32 sign) { throw null; } - public static System.Int32 CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Int32 CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Int32 CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static (int Quotient, int Remainder) DivRem(System.Int32 left, System.Int32 right) { throw null; } - public bool Equals(System.Int32 obj) { throw null; } + public static int Abs(int value) { throw null; } + public static int Clamp(int value, int min, int max) { throw null; } + public int CompareTo(int value) { throw null; } + public int CompareTo(object? value) { throw null; } + public static int CopySign(int value, int sign) { throw null; } + public static int CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static int CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static int CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static (int Quotient, int Remainder) DivRem(int left, int right) { throw null; } + public bool Equals(int obj) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } - public override System.Int32 GetHashCode() { throw null; } + public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static bool IsNegative(System.Int32 value) { throw null; } - public static bool IsPow2(System.Int32 value) { throw null; } - public static System.Int32 LeadingZeroCount(System.Int32 value) { throw null; } - public static System.Int32 Log2(System.Int32 value) { throw null; } - public static System.Int32 Max(System.Int32 x, System.Int32 y) { throw null; } - public static System.Int32 MaxMagnitude(System.Int32 x, System.Int32 y) { throw null; } - public static System.Int32 Min(System.Int32 x, System.Int32 y) { throw null; } - public static System.Int32 MinMagnitude(System.Int32 x, System.Int32 y) { throw null; } - public static System.Int32 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } - public static System.Int32 Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.Int32 Parse(string s) { throw null; } - public static System.Int32 Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.Int32 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.Int32 Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.Int32 PopCount(System.Int32 value) { throw null; } - public static System.Int32 RotateLeft(System.Int32 value, System.Int32 rotateAmount) { throw null; } - public static System.Int32 RotateRight(System.Int32 value, System.Int32 rotateAmount) { throw null; } - public static System.Int32 Sign(System.Int32 value) { throw null; } + public static bool IsNegative(int value) { throw null; } + public static bool IsPow2(int value) { throw null; } + public static int LeadingZeroCount(int value) { throw null; } + public static int Log2(int value) { throw null; } + public static int Max(int x, int y) { throw null; } + public static int MaxMagnitude(int x, int y) { throw null; } + public static int Min(int x, int y) { throw null; } + public static int MinMagnitude(int x, int y) { throw null; } + public static int Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } + public static int Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static int Parse(string s) { throw null; } + public static int Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static int Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static int Parse(string s, System.IFormatProvider? provider) { throw null; } + public static int PopCount(int value) { throw null; } + public static int RotateLeft(int value, int rotateAmount) { throw null; } + public static int RotateRight(int value, int rotateAmount) { throw null; } + public static int Sign(int value) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } @@ -2949,7 +2997,7 @@ public InsufficientMemoryException(string? message, System.Exception? innerExcep decimal System.IConvertible.ToDecimal(System.IFormatProvider? provider) { throw null; } double System.IConvertible.ToDouble(System.IFormatProvider? provider) { throw null; } short System.IConvertible.ToInt16(System.IFormatProvider? provider) { throw null; } - System.Int32 System.IConvertible.ToInt32(System.IFormatProvider? provider) { throw null; } + int System.IConvertible.ToInt32(System.IFormatProvider? provider) { throw null; } long System.IConvertible.ToInt64(System.IFormatProvider? provider) { throw null; } sbyte System.IConvertible.ToSByte(System.IFormatProvider? provider) { throw null; } float System.IConvertible.ToSingle(System.IFormatProvider? provider) { throw null; } @@ -2957,40 +3005,47 @@ public InsufficientMemoryException(string? message, System.Exception? innerExcep ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } - static System.Int32 System.Numerics.IAdditionOperators.operator +(System.Int32 left, System.Int32 right) { throw null; } - static System.Int32 System.Numerics.IBitwiseOperators.operator &(System.Int32 left, System.Int32 right) { throw null; } - static System.Int32 System.Numerics.IBitwiseOperators.operator |(System.Int32 left, System.Int32 right) { throw null; } - static System.Int32 System.Numerics.IBitwiseOperators.operator ^(System.Int32 left, System.Int32 right) { throw null; } - static System.Int32 System.Numerics.IBitwiseOperators.operator ~(System.Int32 value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(System.Int32 left, System.Int32 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(System.Int32 left, System.Int32 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(System.Int32 left, System.Int32 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(System.Int32 left, System.Int32 right) { throw null; } - static System.Int32 System.Numerics.IDecrementOperators.operator --(System.Int32 value) { throw null; } - static System.Int32 System.Numerics.IDivisionOperators.operator /(System.Int32 left, System.Int32 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator ==(System.Int32 left, System.Int32 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator !=(System.Int32 left, System.Int32 right) { throw null; } - static System.Int32 System.Numerics.IIncrementOperators.operator ++(System.Int32 value) { throw null; } - static System.Int32 System.Numerics.IModulusOperators.operator %(System.Int32 left, System.Int32 right) { throw null; } - static System.Int32 System.Numerics.IMultiplyOperators.operator *(System.Int32 left, System.Int32 right) { throw null; } - static System.Int32 System.Numerics.IShiftOperators.operator <<(System.Int32 value, System.Int32 shiftAmount) { throw null; } - static System.Int32 System.Numerics.IShiftOperators.operator >>(System.Int32 value, System.Int32 shiftAmount) { throw null; } - static System.Int32 System.Numerics.ISubtractionOperators.operator -(System.Int32 left, System.Int32 right) { throw null; } - static System.Int32 System.Numerics.IUnaryNegationOperators.operator -(System.Int32 value) { throw null; } - static System.Int32 System.Numerics.IUnaryPlusOperators.operator +(System.Int32 value) { throw null; } + static int System.Numerics.IAdditionOperators.operator +(int left, int right) { throw null; } + static int System.Numerics.IAdditionOperators.operator checked +(int left, int right) { throw null; } + static int System.Numerics.IBitwiseOperators.operator &(int left, int right) { throw null; } + static int System.Numerics.IBitwiseOperators.operator |(int left, int right) { throw null; } + static int System.Numerics.IBitwiseOperators.operator ^(int left, int right) { throw null; } + static int System.Numerics.IBitwiseOperators.operator ~(int value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(int left, int right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(int left, int right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(int left, int right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(int left, int right) { throw null; } + static int System.Numerics.IDecrementOperators.operator checked --(int value) { throw null; } + static int System.Numerics.IDecrementOperators.operator --(int value) { throw null; } + static int System.Numerics.IDivisionOperators.operator checked /(int left, int right) { throw null; } + static int System.Numerics.IDivisionOperators.operator /(int left, int right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator ==(int left, int right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator !=(int left, int right) { throw null; } + static int System.Numerics.IIncrementOperators.operator checked ++(int value) { throw null; } + static int System.Numerics.IIncrementOperators.operator ++(int value) { throw null; } + static int System.Numerics.IModulusOperators.operator %(int left, int right) { throw null; } + static int System.Numerics.IMultiplyOperators.operator checked *(int left, int right) { throw null; } + static int System.Numerics.IMultiplyOperators.operator *(int left, int right) { throw null; } + static int System.Numerics.IShiftOperators.operator <<(int value, int shiftAmount) { throw null; } + static int System.Numerics.IShiftOperators.operator >>(int value, int shiftAmount) { throw null; } + static int System.Numerics.ISubtractionOperators.operator checked -(int left, int right) { throw null; } + static int System.Numerics.ISubtractionOperators.operator -(int left, int right) { throw null; } + static int System.Numerics.IUnaryNegationOperators.operator checked -(int value) { throw null; } + static int System.Numerics.IUnaryNegationOperators.operator -(int value) { throw null; } + static int System.Numerics.IUnaryPlusOperators.operator +(int value) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } - public static System.Int32 TrailingZeroCount(System.Int32 value) { throw null; } - public static bool TryCreate(TOther value, out System.Int32 result) where TOther : System.Numerics.INumber { throw null; } + public static int TrailingZeroCount(int value) { throw null; } + public static bool TryCreate(TOther value, out int result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out System.Int32 charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Int32 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.Int32 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.Int32 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Int32 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.Int32 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.Int32 result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out int result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out int result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out int result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out int result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out int result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out int result) { throw null; } } public readonly partial struct Int64 : System.IComparable, System.IComparable, System.IConvertible, System.IEquatable, System.IFormattable, System.IParsable, System.ISpanFormattable, System.ISpanParsable, System.Numerics.IAdditionOperators, System.Numerics.IAdditiveIdentity, System.Numerics.IBinaryInteger, System.Numerics.IBinaryNumber, System.Numerics.IBitwiseOperators, System.Numerics.IComparisonOperators, System.Numerics.IDecrementOperators, System.Numerics.IDivisionOperators, System.Numerics.IEqualityOperators, System.Numerics.IIncrementOperators, System.Numerics.IMinMaxValue, System.Numerics.IModulusOperators, System.Numerics.IMultiplicativeIdentity, System.Numerics.IMultiplyOperators, System.Numerics.INumber, System.Numerics.INumberBase, System.Numerics.IShiftOperators, System.Numerics.ISignedNumber, System.Numerics.ISubtractionOperators, System.Numerics.IUnaryNegationOperators, System.Numerics.IUnaryPlusOperators { @@ -3004,37 +3059,37 @@ public InsufficientMemoryException(string? message, System.Exception? innerExcep static long System.Numerics.INumberBase.One { get { throw null; } } static long System.Numerics.INumberBase.Zero { get { throw null; } } static long System.Numerics.ISignedNumber.NegativeOne { get { throw null; } } - public static System.Int64 Abs(System.Int64 value) { throw null; } - public static System.Int64 Clamp(System.Int64 value, System.Int64 min, System.Int64 max) { throw null; } - public int CompareTo(System.Int64 value) { throw null; } + public static long Abs(long value) { throw null; } + public static long Clamp(long value, long min, long max) { throw null; } + public int CompareTo(long value) { throw null; } public int CompareTo(object? value) { throw null; } - public static System.Int64 CopySign(System.Int64 value, System.Int64 sign) { throw null; } - public static System.Int64 CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Int64 CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Int64 CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static (long Quotient, long Remainder) DivRem(System.Int64 left, System.Int64 right) { throw null; } - public bool Equals(System.Int64 obj) { throw null; } + public static long CopySign(long value, long sign) { throw null; } + public static long CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static long CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static long CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static (long Quotient, long Remainder) DivRem(long left, long right) { throw null; } + public bool Equals(long obj) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static bool IsNegative(System.Int64 value) { throw null; } - public static bool IsPow2(System.Int64 value) { throw null; } - public static System.Int64 LeadingZeroCount(System.Int64 value) { throw null; } - public static System.Int64 Log2(System.Int64 value) { throw null; } - public static System.Int64 Max(System.Int64 x, System.Int64 y) { throw null; } - public static System.Int64 MaxMagnitude(System.Int64 x, System.Int64 y) { throw null; } - public static System.Int64 Min(System.Int64 x, System.Int64 y) { throw null; } - public static System.Int64 MinMagnitude(System.Int64 x, System.Int64 y) { throw null; } - public static System.Int64 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } - public static System.Int64 Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.Int64 Parse(string s) { throw null; } - public static System.Int64 Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.Int64 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.Int64 Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.Int64 PopCount(System.Int64 value) { throw null; } - public static System.Int64 RotateLeft(System.Int64 value, int rotateAmount) { throw null; } - public static System.Int64 RotateRight(System.Int64 value, int rotateAmount) { throw null; } - public static int Sign(System.Int64 value) { throw null; } + public static bool IsNegative(long value) { throw null; } + public static bool IsPow2(long value) { throw null; } + public static long LeadingZeroCount(long value) { throw null; } + public static long Log2(long value) { throw null; } + public static long Max(long x, long y) { throw null; } + public static long MaxMagnitude(long x, long y) { throw null; } + public static long Min(long x, long y) { throw null; } + public static long MinMagnitude(long x, long y) { throw null; } + public static long Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } + public static long Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static long Parse(string s) { throw null; } + public static long Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static long Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static long Parse(string s, System.IFormatProvider? provider) { throw null; } + public static long PopCount(long value) { throw null; } + public static long RotateLeft(long value, int rotateAmount) { throw null; } + public static long RotateRight(long value, int rotateAmount) { throw null; } + public static int Sign(long value) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } @@ -3043,47 +3098,54 @@ public InsufficientMemoryException(string? message, System.Exception? innerExcep double System.IConvertible.ToDouble(System.IFormatProvider? provider) { throw null; } short System.IConvertible.ToInt16(System.IFormatProvider? provider) { throw null; } int System.IConvertible.ToInt32(System.IFormatProvider? provider) { throw null; } - System.Int64 System.IConvertible.ToInt64(System.IFormatProvider? provider) { throw null; } + long System.IConvertible.ToInt64(System.IFormatProvider? provider) { throw null; } sbyte System.IConvertible.ToSByte(System.IFormatProvider? provider) { throw null; } float System.IConvertible.ToSingle(System.IFormatProvider? provider) { throw null; } object System.IConvertible.ToType(System.Type type, System.IFormatProvider? provider) { throw null; } ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } - static System.Int64 System.Numerics.IAdditionOperators.operator +(System.Int64 left, System.Int64 right) { throw null; } - static System.Int64 System.Numerics.IBitwiseOperators.operator &(System.Int64 left, System.Int64 right) { throw null; } - static System.Int64 System.Numerics.IBitwiseOperators.operator |(System.Int64 left, System.Int64 right) { throw null; } - static System.Int64 System.Numerics.IBitwiseOperators.operator ^(System.Int64 left, System.Int64 right) { throw null; } - static System.Int64 System.Numerics.IBitwiseOperators.operator ~(System.Int64 value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(System.Int64 left, System.Int64 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(System.Int64 left, System.Int64 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(System.Int64 left, System.Int64 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(System.Int64 left, System.Int64 right) { throw null; } - static System.Int64 System.Numerics.IDecrementOperators.operator --(System.Int64 value) { throw null; } - static System.Int64 System.Numerics.IDivisionOperators.operator /(System.Int64 left, System.Int64 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator ==(System.Int64 left, System.Int64 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator !=(System.Int64 left, System.Int64 right) { throw null; } - static System.Int64 System.Numerics.IIncrementOperators.operator ++(System.Int64 value) { throw null; } - static System.Int64 System.Numerics.IModulusOperators.operator %(System.Int64 left, System.Int64 right) { throw null; } - static System.Int64 System.Numerics.IMultiplyOperators.operator *(System.Int64 left, System.Int64 right) { throw null; } - static System.Int64 System.Numerics.IShiftOperators.operator <<(System.Int64 value, int shiftAmount) { throw null; } - static System.Int64 System.Numerics.IShiftOperators.operator >>(System.Int64 value, int shiftAmount) { throw null; } - static System.Int64 System.Numerics.ISubtractionOperators.operator -(System.Int64 left, System.Int64 right) { throw null; } - static System.Int64 System.Numerics.IUnaryNegationOperators.operator -(System.Int64 value) { throw null; } - static System.Int64 System.Numerics.IUnaryPlusOperators.operator +(System.Int64 value) { throw null; } + static long System.Numerics.IAdditionOperators.operator +(long left, long right) { throw null; } + static long System.Numerics.IAdditionOperators.operator checked +(long left, long right) { throw null; } + static long System.Numerics.IBitwiseOperators.operator &(long left, long right) { throw null; } + static long System.Numerics.IBitwiseOperators.operator |(long left, long right) { throw null; } + static long System.Numerics.IBitwiseOperators.operator ^(long left, long right) { throw null; } + static long System.Numerics.IBitwiseOperators.operator ~(long value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(long left, long right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(long left, long right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(long left, long right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(long left, long right) { throw null; } + static long System.Numerics.IDecrementOperators.operator checked --(long value) { throw null; } + static long System.Numerics.IDecrementOperators.operator --(long value) { throw null; } + static long System.Numerics.IDivisionOperators.operator checked /(long left, long right) { throw null; } + static long System.Numerics.IDivisionOperators.operator /(long left, long right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator ==(long left, long right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator !=(long left, long right) { throw null; } + static long System.Numerics.IIncrementOperators.operator checked ++(long value) { throw null; } + static long System.Numerics.IIncrementOperators.operator ++(long value) { throw null; } + static long System.Numerics.IModulusOperators.operator %(long left, long right) { throw null; } + static long System.Numerics.IMultiplyOperators.operator checked *(long left, long right) { throw null; } + static long System.Numerics.IMultiplyOperators.operator *(long left, long right) { throw null; } + static long System.Numerics.IShiftOperators.operator <<(long value, int shiftAmount) { throw null; } + static long System.Numerics.IShiftOperators.operator >>(long value, int shiftAmount) { throw null; } + static long System.Numerics.ISubtractionOperators.operator checked -(long left, long right) { throw null; } + static long System.Numerics.ISubtractionOperators.operator -(long left, long right) { throw null; } + static long System.Numerics.IUnaryNegationOperators.operator checked -(long value) { throw null; } + static long System.Numerics.IUnaryNegationOperators.operator -(long value) { throw null; } + static long System.Numerics.IUnaryPlusOperators.operator +(long value) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } - public static System.Int64 TrailingZeroCount(System.Int64 value) { throw null; } - public static bool TryCreate(TOther value, out System.Int64 result) where TOther : System.Numerics.INumber { throw null; } + public static long TrailingZeroCount(long value) { throw null; } + public static bool TryCreate(TOther value, out long result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Int64 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.Int64 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.Int64 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Int64 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.Int64 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.Int64 result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out long result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out long result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out long result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out long result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out long result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out long result) { throw null; } } public readonly partial struct IntPtr : System.IComparable, System.IComparable, System.IEquatable, System.IFormattable, System.IParsable, System.ISpanFormattable, System.ISpanParsable, System.Numerics.IAdditionOperators, System.Numerics.IAdditiveIdentity, System.Numerics.IBinaryInteger, System.Numerics.IBinaryNumber, System.Numerics.IBitwiseOperators, System.Numerics.IComparisonOperators, System.Numerics.IDecrementOperators, System.Numerics.IDivisionOperators, System.Numerics.IEqualityOperators, System.Numerics.IIncrementOperators, System.Numerics.IMinMaxValue, System.Numerics.IModulusOperators, System.Numerics.IMultiplicativeIdentity, System.Numerics.IMultiplyOperators, System.Numerics.INumber, System.Numerics.INumberBase, System.Numerics.IShiftOperators, System.Numerics.ISignedNumber, System.Numerics.ISubtractionOperators, System.Numerics.IUnaryNegationOperators, System.Numerics.IUnaryPlusOperators, System.Runtime.Serialization.ISerializable { @@ -3128,7 +3190,8 @@ public InsufficientMemoryException(string? message, System.Exception? innerExcep public static System.IntPtr Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } public static System.IntPtr Parse(string s, System.IFormatProvider? provider) { throw null; } public static System.IntPtr Subtract(System.IntPtr pointer, int offset) { throw null; } - static nint System.Numerics.IAdditionOperators.operator +(nint left, nint right) { throw null; } + static nint System.Numerics.IAdditionOperators.operator +(nint left, nint right) { throw null; } + static nint System.Numerics.IAdditionOperators.operator checked +(nint left, nint right) { throw null; } static (nint Quotient, nint Remainder) System.Numerics.IBinaryInteger.DivRem(nint left, nint right) { throw null; } static nint System.Numerics.IBinaryInteger.LeadingZeroCount(nint value) { throw null; } static nint System.Numerics.IBinaryInteger.PopCount(nint value) { throw null; } @@ -3137,19 +3200,23 @@ public InsufficientMemoryException(string? message, System.Exception? innerExcep static nint System.Numerics.IBinaryInteger.TrailingZeroCount(nint value) { throw null; } static bool System.Numerics.IBinaryNumber.IsPow2(nint value) { throw null; } static nint System.Numerics.IBinaryNumber.Log2(nint value) { throw null; } - static nint System.Numerics.IBitwiseOperators.operator &(nint left, nint right) { throw null; } - static nint System.Numerics.IBitwiseOperators.operator |(nint left, nint right) { throw null; } - static nint System.Numerics.IBitwiseOperators.operator ^(nint left, nint right) { throw null; } - static nint System.Numerics.IBitwiseOperators.operator ~(nint value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(nint left, nint right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(nint left, nint right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(nint left, nint right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(nint left, nint right) { throw null; } + static nint System.Numerics.IBitwiseOperators.operator &(nint left, nint right) { throw null; } + static nint System.Numerics.IBitwiseOperators.operator |(nint left, nint right) { throw null; } + static nint System.Numerics.IBitwiseOperators.operator ^(nint left, nint right) { throw null; } + static nint System.Numerics.IBitwiseOperators.operator ~(nint value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(nint left, nint right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(nint left, nint right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(nint left, nint right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(nint left, nint right) { throw null; } + static nint System.Numerics.IDecrementOperators.operator checked --(nint value) { throw null; } static nint System.Numerics.IDecrementOperators.operator --(nint value) { throw null; } - static nint System.Numerics.IDivisionOperators.operator /(nint left, nint right) { throw null; } + static nint System.Numerics.IDivisionOperators.operator checked /(nint left, nint right) { throw null; } + static nint System.Numerics.IDivisionOperators.operator /(nint left, nint right) { throw null; } + static nint System.Numerics.IIncrementOperators.operator checked ++(nint value) { throw null; } static nint System.Numerics.IIncrementOperators.operator ++(nint value) { throw null; } - static nint System.Numerics.IModulusOperators.operator %(nint left, nint right) { throw null; } - static nint System.Numerics.IMultiplyOperators.operator *(nint left, nint right) { throw null; } + static nint System.Numerics.IModulusOperators.operator %(nint left, nint right) { throw null; } + static nint System.Numerics.IMultiplyOperators.operator checked *(nint left, nint right) { throw null; } + static nint System.Numerics.IMultiplyOperators.operator *(nint left, nint right) { throw null; } static nint System.Numerics.INumber.Abs(nint value) { throw null; } static nint System.Numerics.INumber.Clamp(nint value, nint min, nint max) { throw null; } static nint System.Numerics.INumber.CopySign(nint value, nint sign) { throw null; } @@ -3163,11 +3230,13 @@ public InsufficientMemoryException(string? message, System.Exception? innerExcep static nint System.Numerics.INumber.MinMagnitude(nint x, nint y) { throw null; } static int System.Numerics.INumber.Sign(nint value) { throw null; } static bool System.Numerics.INumber.TryCreate(TOther value, out nint result) { throw null; } - static nint System.Numerics.IShiftOperators.operator <<(nint value, int shiftAmount) { throw null; } - static nint System.Numerics.IShiftOperators.operator >>(nint value, int shiftAmount) { throw null; } - static nint System.Numerics.ISubtractionOperators.operator -(nint left, nint right) { throw null; } - static nint System.Numerics.IUnaryNegationOperators.operator -(nint value) { throw null; } - static nint System.Numerics.IUnaryPlusOperators.operator +(nint value) { throw null; } + static nint System.Numerics.IShiftOperators.operator <<(nint value, int shiftAmount) { throw null; } + static nint System.Numerics.IShiftOperators.operator >>(nint value, int shiftAmount) { throw null; } + static nint System.Numerics.ISubtractionOperators.operator checked -(nint left, nint right) { throw null; } + static nint System.Numerics.ISubtractionOperators.operator -(nint left, nint right) { throw null; } + static nint System.Numerics.IUnaryNegationOperators.operator checked -(nint value) { throw null; } + static nint System.Numerics.IUnaryNegationOperators.operator -(nint value) { throw null; } + static nint System.Numerics.IUnaryPlusOperators.operator +(nint value) { throw null; } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public int ToInt32() { throw null; } public long ToInt64() { throw null; } @@ -3996,37 +4065,37 @@ public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, S static sbyte System.Numerics.INumberBase.One { get { throw null; } } static sbyte System.Numerics.INumberBase.Zero { get { throw null; } } static sbyte System.Numerics.ISignedNumber.NegativeOne { get { throw null; } } - public static System.SByte Abs(System.SByte value) { throw null; } - public static System.SByte Clamp(System.SByte value, System.SByte min, System.SByte max) { throw null; } + public static sbyte Abs(sbyte value) { throw null; } + public static sbyte Clamp(sbyte value, sbyte min, sbyte max) { throw null; } public int CompareTo(object? obj) { throw null; } - public int CompareTo(System.SByte value) { throw null; } - public static System.SByte CopySign(System.SByte value, System.SByte sign) { throw null; } - public static System.SByte CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.SByte CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.SByte CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static (sbyte Quotient, sbyte Remainder) DivRem(System.SByte left, System.SByte right) { throw null; } + public int CompareTo(sbyte value) { throw null; } + public static sbyte CopySign(sbyte value, sbyte sign) { throw null; } + public static sbyte CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static sbyte CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static sbyte CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static (sbyte Quotient, sbyte Remainder) DivRem(sbyte left, sbyte right) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } - public bool Equals(System.SByte obj) { throw null; } + public bool Equals(sbyte obj) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static bool IsNegative(System.SByte value) { throw null; } - public static bool IsPow2(System.SByte value) { throw null; } - public static System.SByte LeadingZeroCount(System.SByte value) { throw null; } - public static System.SByte Log2(System.SByte value) { throw null; } - public static System.SByte Max(System.SByte x, System.SByte y) { throw null; } - public static System.SByte MaxMagnitude(System.SByte x, System.SByte y) { throw null; } - public static System.SByte Min(System.SByte x, System.SByte y) { throw null; } - public static System.SByte MinMagnitude(System.SByte x, System.SByte y) { throw null; } - public static System.SByte Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } - public static System.SByte Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.SByte Parse(string s) { throw null; } - public static System.SByte Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.SByte Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.SByte Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.SByte PopCount(System.SByte value) { throw null; } - public static System.SByte RotateLeft(System.SByte value, int rotateAmount) { throw null; } - public static System.SByte RotateRight(System.SByte value, int rotateAmount) { throw null; } - public static int Sign(System.SByte value) { throw null; } + public static bool IsNegative(sbyte value) { throw null; } + public static bool IsPow2(sbyte value) { throw null; } + public static sbyte LeadingZeroCount(sbyte value) { throw null; } + public static sbyte Log2(sbyte value) { throw null; } + public static sbyte Max(sbyte x, sbyte y) { throw null; } + public static sbyte MaxMagnitude(sbyte x, sbyte y) { throw null; } + public static sbyte Min(sbyte x, sbyte y) { throw null; } + public static sbyte MinMagnitude(sbyte x, sbyte y) { throw null; } + public static sbyte Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } + public static sbyte Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static sbyte Parse(string s) { throw null; } + public static sbyte Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static sbyte Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static sbyte Parse(string s, System.IFormatProvider? provider) { throw null; } + public static sbyte PopCount(sbyte value) { throw null; } + public static sbyte RotateLeft(sbyte value, int rotateAmount) { throw null; } + public static sbyte RotateRight(sbyte value, int rotateAmount) { throw null; } + public static int Sign(sbyte value) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } @@ -4036,46 +4105,53 @@ public void GetObjectData(System.Runtime.Serialization.SerializationInfo info, S short System.IConvertible.ToInt16(System.IFormatProvider? provider) { throw null; } int System.IConvertible.ToInt32(System.IFormatProvider? provider) { throw null; } long System.IConvertible.ToInt64(System.IFormatProvider? provider) { throw null; } - System.SByte System.IConvertible.ToSByte(System.IFormatProvider? provider) { throw null; } + sbyte System.IConvertible.ToSByte(System.IFormatProvider? provider) { throw null; } float System.IConvertible.ToSingle(System.IFormatProvider? provider) { throw null; } object System.IConvertible.ToType(System.Type type, System.IFormatProvider? provider) { throw null; } ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } - static System.SByte System.Numerics.IAdditionOperators.operator +(System.SByte left, System.SByte right) { throw null; } - static System.SByte System.Numerics.IBitwiseOperators.operator &(System.SByte left, System.SByte right) { throw null; } - static System.SByte System.Numerics.IBitwiseOperators.operator |(System.SByte left, System.SByte right) { throw null; } - static System.SByte System.Numerics.IBitwiseOperators.operator ^(System.SByte left, System.SByte right) { throw null; } - static System.SByte System.Numerics.IBitwiseOperators.operator ~(System.SByte value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(System.SByte left, System.SByte right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(System.SByte left, System.SByte right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(System.SByte left, System.SByte right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(System.SByte left, System.SByte right) { throw null; } - static System.SByte System.Numerics.IDecrementOperators.operator --(System.SByte value) { throw null; } - static System.SByte System.Numerics.IDivisionOperators.operator /(System.SByte left, System.SByte right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator ==(System.SByte left, System.SByte right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator !=(System.SByte left, System.SByte right) { throw null; } - static System.SByte System.Numerics.IIncrementOperators.operator ++(System.SByte value) { throw null; } - static System.SByte System.Numerics.IModulusOperators.operator %(System.SByte left, System.SByte right) { throw null; } - static System.SByte System.Numerics.IMultiplyOperators.operator *(System.SByte left, System.SByte right) { throw null; } - static System.SByte System.Numerics.IShiftOperators.operator <<(System.SByte value, int shiftAmount) { throw null; } - static System.SByte System.Numerics.IShiftOperators.operator >>(System.SByte value, int shiftAmount) { throw null; } - static System.SByte System.Numerics.ISubtractionOperators.operator -(System.SByte left, System.SByte right) { throw null; } - static System.SByte System.Numerics.IUnaryNegationOperators.operator -(System.SByte value) { throw null; } - static System.SByte System.Numerics.IUnaryPlusOperators.operator +(System.SByte value) { throw null; } + static sbyte System.Numerics.IAdditionOperators.operator +(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IAdditionOperators.operator checked +(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IBitwiseOperators.operator &(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IBitwiseOperators.operator |(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IBitwiseOperators.operator ^(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IBitwiseOperators.operator ~(sbyte value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(sbyte left, sbyte right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(sbyte left, sbyte right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(sbyte left, sbyte right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IDecrementOperators.operator checked --(sbyte value) { throw null; } + static sbyte System.Numerics.IDecrementOperators.operator --(sbyte value) { throw null; } + static sbyte System.Numerics.IDivisionOperators.operator checked /(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IDivisionOperators.operator /(sbyte left, sbyte right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator ==(sbyte left, sbyte right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator !=(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IIncrementOperators.operator checked ++(sbyte value) { throw null; } + static sbyte System.Numerics.IIncrementOperators.operator ++(sbyte value) { throw null; } + static sbyte System.Numerics.IModulusOperators.operator %(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IMultiplyOperators.operator checked *(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IMultiplyOperators.operator *(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IShiftOperators.operator <<(sbyte value, int shiftAmount) { throw null; } + static sbyte System.Numerics.IShiftOperators.operator >>(sbyte value, int shiftAmount) { throw null; } + static sbyte System.Numerics.ISubtractionOperators.operator checked -(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.ISubtractionOperators.operator -(sbyte left, sbyte right) { throw null; } + static sbyte System.Numerics.IUnaryNegationOperators.operator checked -(sbyte value) { throw null; } + static sbyte System.Numerics.IUnaryNegationOperators.operator -(sbyte value) { throw null; } + static sbyte System.Numerics.IUnaryPlusOperators.operator +(sbyte value) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } - public static System.SByte TrailingZeroCount(System.SByte value) { throw null; } - public static bool TryCreate(TOther value, out System.SByte result) where TOther : System.Numerics.INumber { throw null; } + public static sbyte TrailingZeroCount(sbyte value) { throw null; } + public static bool TryCreate(TOther value, out sbyte result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.SByte result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.SByte result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.SByte result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.SByte result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.SByte result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.SByte result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out sbyte result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out sbyte result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out sbyte result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out sbyte result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out sbyte result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out sbyte result) { throw null; } } [System.AttributeUsageAttribute(System.AttributeTargets.Class | System.AttributeTargets.Delegate | System.AttributeTargets.Enum | System.AttributeTargets.Struct, Inherited=false)] public sealed partial class SerializableAttribute : System.Attribute @@ -4110,78 +4186,78 @@ public SerializableAttribute() { } static float System.Numerics.INumberBase.One { get { throw null; } } static float System.Numerics.INumberBase.Zero { get { throw null; } } static float System.Numerics.ISignedNumber.NegativeOne { get { throw null; } } - public static System.Single Abs(System.Single value) { throw null; } - public static System.Single Acos(System.Single x) { throw null; } - public static System.Single Acosh(System.Single x) { throw null; } - public static System.Single Asin(System.Single x) { throw null; } - public static System.Single Asinh(System.Single x) { throw null; } - public static System.Single Atan(System.Single x) { throw null; } - public static System.Single Atan2(System.Single y, System.Single x) { throw null; } - public static System.Single Atanh(System.Single x) { throw null; } - public static System.Single BitDecrement(System.Single x) { throw null; } - public static System.Single BitIncrement(System.Single x) { throw null; } - public static System.Single Cbrt(System.Single x) { throw null; } - public static System.Single Ceiling(System.Single x) { throw null; } - public static System.Single Clamp(System.Single value, System.Single min, System.Single max) { throw null; } + public static float Abs(float value) { throw null; } + public static float Acos(float x) { throw null; } + public static float Acosh(float x) { throw null; } + public static float Asin(float x) { throw null; } + public static float Asinh(float x) { throw null; } + public static float Atan(float x) { throw null; } + public static float Atan2(float y, float x) { throw null; } + public static float Atanh(float x) { throw null; } + public static float BitDecrement(float x) { throw null; } + public static float BitIncrement(float x) { throw null; } + public static float Cbrt(float x) { throw null; } + public static float Ceiling(float x) { throw null; } + public static float Clamp(float value, float min, float max) { throw null; } public int CompareTo(object? value) { throw null; } - public int CompareTo(System.Single value) { throw null; } - public static System.Single CopySign(System.Single x, System.Single y) { throw null; } - public static System.Single Cos(System.Single x) { throw null; } - public static System.Single Cosh(System.Single x) { throw null; } - public static System.Single CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Single CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.Single CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public int CompareTo(float value) { throw null; } + public static float CopySign(float x, float y) { throw null; } + public static float Cos(float x) { throw null; } + public static float Cosh(float x) { throw null; } + public static float CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static float CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static float CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } - public bool Equals(System.Single obj) { throw null; } - public static System.Single Exp(System.Single x) { throw null; } - public static System.Single Floor(System.Single x) { throw null; } - public static System.Single FusedMultiplyAdd(System.Single left, System.Single right, System.Single addend) { throw null; } + public bool Equals(float obj) { throw null; } + public static float Exp(float x) { throw null; } + public static float Floor(float x) { throw null; } + public static float FusedMultiplyAdd(float left, float right, float addend) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static System.Single Ieee754Remainder(System.Single left, System.Single right) { throw null; } - public static int ILogB(System.Single x) { throw null; } - public static bool IsFinite(System.Single f) { throw null; } - public static bool IsInfinity(System.Single f) { throw null; } - public static bool IsNaN(System.Single f) { throw null; } - public static bool IsNegative(System.Single f) { throw null; } - public static bool IsNegativeInfinity(System.Single f) { throw null; } - public static bool IsNormal(System.Single f) { throw null; } - public static bool IsPositiveInfinity(System.Single f) { throw null; } - public static bool IsPow2(System.Single value) { throw null; } - public static bool IsSubnormal(System.Single f) { throw null; } - public static System.Single Log(System.Single x) { throw null; } - public static System.Single Log(System.Single x, System.Single newBase) { throw null; } - public static System.Single Log10(System.Single x) { throw null; } - public static System.Single Log2(System.Single value) { throw null; } - public static System.Single Max(System.Single x, System.Single y) { throw null; } - public static System.Single MaxMagnitude(System.Single x, System.Single y) { throw null; } - public static System.Single Min(System.Single x, System.Single y) { throw null; } - public static System.Single MinMagnitude(System.Single x, System.Single y) { throw null; } - public static bool operator ==(System.Single left, System.Single right) { throw null; } - public static bool operator >(System.Single left, System.Single right) { throw null; } - public static bool operator >=(System.Single left, System.Single right) { throw null; } - public static bool operator !=(System.Single left, System.Single right) { throw null; } - public static bool operator <(System.Single left, System.Single right) { throw null; } - public static bool operator <=(System.Single left, System.Single right) { throw null; } - public static System.Single Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.AllowDecimalPoint | System.Globalization.NumberStyles.AllowExponent | System.Globalization.NumberStyles.AllowLeadingSign | System.Globalization.NumberStyles.AllowLeadingWhite | System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowTrailingWhite, System.IFormatProvider? provider = null) { throw null; } - public static System.Single Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.Single Parse(string s) { throw null; } - public static System.Single Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.Single Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.Single Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.Single Pow(System.Single x, System.Single y) { throw null; } - public static System.Single ReciprocalEstimate(System.Single x) { throw null; } - public static System.Single ReciprocalSqrtEstimate(System.Single x) { throw null; } - public static System.Single Round(System.Single x) { throw null; } - public static System.Single Round(System.Single x, int digits) { throw null; } - public static System.Single Round(System.Single x, int digits, System.MidpointRounding mode) { throw null; } - public static System.Single Round(System.Single x, System.MidpointRounding mode) { throw null; } - public static System.Single ScaleB(System.Single x, int n) { throw null; } - public static int Sign(System.Single value) { throw null; } - public static System.Single Sin(System.Single x) { throw null; } - public static (System.Single Sin, System.Single Cos) SinCos(System.Single x) { throw null; } - public static System.Single Sinh(System.Single x) { throw null; } - public static System.Single Sqrt(System.Single x) { throw null; } + public static float Ieee754Remainder(float left, float right) { throw null; } + public static int ILogB(float x) { throw null; } + public static bool IsFinite(float f) { throw null; } + public static bool IsInfinity(float f) { throw null; } + public static bool IsNaN(float f) { throw null; } + public static bool IsNegative(float f) { throw null; } + public static bool IsNegativeInfinity(float f) { throw null; } + public static bool IsNormal(float f) { throw null; } + public static bool IsPositiveInfinity(float f) { throw null; } + public static bool IsPow2(float value) { throw null; } + public static bool IsSubnormal(float f) { throw null; } + public static float Log(float x) { throw null; } + public static float Log(float x, float newBase) { throw null; } + public static float Log10(float x) { throw null; } + public static float Log2(float value) { throw null; } + public static float Max(float x, float y) { throw null; } + public static float MaxMagnitude(float x, float y) { throw null; } + public static float Min(float x, float y) { throw null; } + public static float MinMagnitude(float x, float y) { throw null; } + public static bool operator ==(float left, float right) { throw null; } + public static bool operator >(float left, float right) { throw null; } + public static bool operator >=(float left, float right) { throw null; } + public static bool operator !=(float left, float right) { throw null; } + public static bool operator <(float left, float right) { throw null; } + public static bool operator <=(float left, float right) { throw null; } + public static float Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.AllowDecimalPoint | System.Globalization.NumberStyles.AllowExponent | System.Globalization.NumberStyles.AllowLeadingSign | System.Globalization.NumberStyles.AllowLeadingWhite | System.Globalization.NumberStyles.AllowThousands | System.Globalization.NumberStyles.AllowTrailingWhite, System.IFormatProvider? provider = null) { throw null; } + public static float Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static float Parse(string s) { throw null; } + public static float Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static float Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static float Parse(string s, System.IFormatProvider? provider) { throw null; } + public static float Pow(float x, float y) { throw null; } + public static float ReciprocalEstimate(float x) { throw null; } + public static float ReciprocalSqrtEstimate(float x) { throw null; } + public static float Round(float x) { throw null; } + public static float Round(float x, int digits) { throw null; } + public static float Round(float x, int digits, System.MidpointRounding mode) { throw null; } + public static float Round(float x, System.MidpointRounding mode) { throw null; } + public static float ScaleB(float x, int n) { throw null; } + public static int Sign(float value) { throw null; } + public static float Sin(float x) { throw null; } + public static (float Sin, float Cos) SinCos(float x) { throw null; } + public static float Sinh(float x) { throw null; } + public static float Sqrt(float x) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } @@ -4192,39 +4268,46 @@ public SerializableAttribute() { } int System.IConvertible.ToInt32(System.IFormatProvider? provider) { throw null; } long System.IConvertible.ToInt64(System.IFormatProvider? provider) { throw null; } sbyte System.IConvertible.ToSByte(System.IFormatProvider? provider) { throw null; } - System.Single System.IConvertible.ToSingle(System.IFormatProvider? provider) { throw null; } + float System.IConvertible.ToSingle(System.IFormatProvider? provider) { throw null; } object System.IConvertible.ToType(System.Type type, System.IFormatProvider? provider) { throw null; } ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } - static System.Single System.Numerics.IAdditionOperators.operator +(System.Single left, System.Single right) { throw null; } - static System.Single System.Numerics.IBitwiseOperators.operator &(System.Single left, System.Single right) { throw null; } - static System.Single System.Numerics.IBitwiseOperators.operator |(System.Single left, System.Single right) { throw null; } - static System.Single System.Numerics.IBitwiseOperators.operator ^(System.Single left, System.Single right) { throw null; } - static System.Single System.Numerics.IBitwiseOperators.operator ~(System.Single value) { throw null; } - static System.Single System.Numerics.IDecrementOperators.operator --(System.Single value) { throw null; } - static System.Single System.Numerics.IDivisionOperators.operator /(System.Single left, System.Single right) { throw null; } - static System.Single System.Numerics.IIncrementOperators.operator ++(System.Single value) { throw null; } - static System.Single System.Numerics.IModulusOperators.operator %(System.Single left, System.Single right) { throw null; } - static System.Single System.Numerics.IMultiplyOperators.operator *(System.Single left, System.Single right) { throw null; } - static System.Single System.Numerics.ISubtractionOperators.operator -(System.Single left, System.Single right) { throw null; } - static System.Single System.Numerics.IUnaryNegationOperators.operator -(System.Single value) { throw null; } - static System.Single System.Numerics.IUnaryPlusOperators.operator +(System.Single value) { throw null; } - public static System.Single Tan(System.Single x) { throw null; } - public static System.Single Tanh(System.Single x) { throw null; } + static float System.Numerics.IAdditionOperators.operator +(float left, float right) { throw null; } + static float System.Numerics.IAdditionOperators.operator checked +(float left, float right) { throw null; } + static float System.Numerics.IBitwiseOperators.operator &(float left, float right) { throw null; } + static float System.Numerics.IBitwiseOperators.operator |(float left, float right) { throw null; } + static float System.Numerics.IBitwiseOperators.operator ^(float left, float right) { throw null; } + static float System.Numerics.IBitwiseOperators.operator ~(float value) { throw null; } + static float System.Numerics.IDecrementOperators.operator checked --(float value) { throw null; } + static float System.Numerics.IDecrementOperators.operator --(float value) { throw null; } + static float System.Numerics.IDivisionOperators.operator checked /(float left, float right) { throw null; } + static float System.Numerics.IDivisionOperators.operator /(float left, float right) { throw null; } + static float System.Numerics.IIncrementOperators.operator checked ++(float value) { throw null; } + static float System.Numerics.IIncrementOperators.operator ++(float value) { throw null; } + static float System.Numerics.IModulusOperators.operator %(float left, float right) { throw null; } + static float System.Numerics.IMultiplyOperators.operator checked *(float left, float right) { throw null; } + static float System.Numerics.IMultiplyOperators.operator *(float left, float right) { throw null; } + static float System.Numerics.ISubtractionOperators.operator checked -(float left, float right) { throw null; } + static float System.Numerics.ISubtractionOperators.operator -(float left, float right) { throw null; } + static float System.Numerics.IUnaryNegationOperators.operator checked -(float value) { throw null; } + static float System.Numerics.IUnaryNegationOperators.operator -(float value) { throw null; } + static float System.Numerics.IUnaryPlusOperators.operator +(float value) { throw null; } + public static float Tan(float x) { throw null; } + public static float Tanh(float x) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } - public static System.Single Truncate(System.Single x) { throw null; } - public static bool TryCreate(TOther value, out System.Single result) where TOther : System.Numerics.INumber { throw null; } + public static float Truncate(float x) { throw null; } + public static bool TryCreate(TOther value, out float result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Single result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.Single result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.Single result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.Single result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.Single result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.Single result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out float result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out float result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out float result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out float result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out float result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out float result) { throw null; } } public readonly ref partial struct Span { @@ -4580,6 +4663,7 @@ public ThreadStaticAttribute() { } public static System.TimeOnly ParseExact(string s, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("TimeOnlyFormat")] string format, System.IFormatProvider? provider, System.Globalization.DateTimeStyles style = System.Globalization.DateTimeStyles.None) { throw null; } public static System.TimeOnly ParseExact(string s, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("TimeOnlyFormat")] string[] formats) { throw null; } public static System.TimeOnly ParseExact(string s, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("TimeOnlyFormat")] string[] formats, System.IFormatProvider? provider, System.Globalization.DateTimeStyles style = System.Globalization.DateTimeStyles.None) { throw null; } + static System.TimeSpan System.Numerics.ISubtractionOperators.operator checked -(System.TimeOnly left, System.TimeOnly right) { throw null; } public string ToLongTimeString() { throw null; } public string ToShortTimeString() { throw null; } public override string ToString() { throw null; } @@ -4683,6 +4767,12 @@ public TimeoutException(string? message, System.Exception? innerException) { } public static System.TimeSpan ParseExact(string input, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("TimeSpanFormat")] string[] formats, System.IFormatProvider? formatProvider) { throw null; } public static System.TimeSpan ParseExact(string input, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("TimeSpanFormat")] string[] formats, System.IFormatProvider? formatProvider, System.Globalization.TimeSpanStyles styles) { throw null; } public System.TimeSpan Subtract(System.TimeSpan ts) { throw null; } + static System.TimeSpan System.Numerics.IAdditionOperators.operator checked +(System.TimeSpan left, System.TimeSpan right) { throw null; } + static System.TimeSpan System.Numerics.IDivisionOperators.operator checked /(System.TimeSpan left, double right) { throw null; } + static double System.Numerics.IDivisionOperators.operator checked /(System.TimeSpan left, System.TimeSpan right) { throw null; } + static System.TimeSpan System.Numerics.IMultiplyOperators.operator checked *(System.TimeSpan left, double right) { throw null; } + static System.TimeSpan System.Numerics.ISubtractionOperators.operator checked -(System.TimeSpan left, System.TimeSpan right) { throw null; } + static System.TimeSpan System.Numerics.IUnaryNegationOperators.operator checked -(System.TimeSpan value) { throw null; } public override string ToString() { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("TimeSpanFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("TimeSpanFormat")] string? format, System.IFormatProvider? formatProvider) { throw null; } @@ -5398,32 +5488,32 @@ public TypeUnloadedException(string? message, System.Exception? innerException) static ushort System.Numerics.IMultiplicativeIdentity.MultiplicativeIdentity { get { throw null; } } static ushort System.Numerics.INumberBase.One { get { throw null; } } static ushort System.Numerics.INumberBase.Zero { get { throw null; } } - public static System.UInt16 Clamp(System.UInt16 value, System.UInt16 min, System.UInt16 max) { throw null; } + public static ushort Clamp(ushort value, ushort min, ushort max) { throw null; } public int CompareTo(object? value) { throw null; } - public int CompareTo(System.UInt16 value) { throw null; } - public static System.UInt16 CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.UInt16 CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.UInt16 CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static (ushort Quotient, ushort Remainder) DivRem(System.UInt16 left, System.UInt16 right) { throw null; } + public int CompareTo(ushort value) { throw null; } + public static ushort CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static ushort CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static ushort CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static (ushort Quotient, ushort Remainder) DivRem(ushort left, ushort right) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } - public bool Equals(System.UInt16 obj) { throw null; } + public bool Equals(ushort obj) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static bool IsPow2(System.UInt16 value) { throw null; } - public static System.UInt16 LeadingZeroCount(System.UInt16 value) { throw null; } - public static System.UInt16 Log2(System.UInt16 value) { throw null; } - public static System.UInt16 Max(System.UInt16 x, System.UInt16 y) { throw null; } - public static System.UInt16 Min(System.UInt16 x, System.UInt16 y) { throw null; } - public static System.UInt16 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } - public static System.UInt16 Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.UInt16 Parse(string s) { throw null; } - public static System.UInt16 Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.UInt16 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.UInt16 Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.UInt16 PopCount(System.UInt16 value) { throw null; } - public static System.UInt16 RotateLeft(System.UInt16 value, int rotateAmount) { throw null; } - public static System.UInt16 RotateRight(System.UInt16 value, int rotateAmount) { throw null; } - public static int Sign(System.UInt16 value) { throw null; } + public static bool IsPow2(ushort value) { throw null; } + public static ushort LeadingZeroCount(ushort value) { throw null; } + public static ushort Log2(ushort value) { throw null; } + public static ushort Max(ushort x, ushort y) { throw null; } + public static ushort Min(ushort x, ushort y) { throw null; } + public static ushort Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } + public static ushort Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static ushort Parse(string s) { throw null; } + public static ushort Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static ushort Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static ushort Parse(string s, System.IFormatProvider? provider) { throw null; } + public static ushort PopCount(ushort value) { throw null; } + public static ushort RotateLeft(ushort value, int rotateAmount) { throw null; } + public static ushort RotateRight(ushort value, int rotateAmount) { throw null; } + public static int Sign(ushort value) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } @@ -5436,48 +5526,55 @@ public TypeUnloadedException(string? message, System.Exception? innerException) sbyte System.IConvertible.ToSByte(System.IFormatProvider? provider) { throw null; } float System.IConvertible.ToSingle(System.IFormatProvider? provider) { throw null; } object System.IConvertible.ToType(System.Type type, System.IFormatProvider? provider) { throw null; } - System.UInt16 System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } + ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } - static System.UInt16 System.Numerics.IAdditionOperators.operator +(System.UInt16 left, System.UInt16 right) { throw null; } - static System.UInt16 System.Numerics.IBitwiseOperators.operator &(System.UInt16 left, System.UInt16 right) { throw null; } - static System.UInt16 System.Numerics.IBitwiseOperators.operator |(System.UInt16 left, System.UInt16 right) { throw null; } - static System.UInt16 System.Numerics.IBitwiseOperators.operator ^(System.UInt16 left, System.UInt16 right) { throw null; } - static System.UInt16 System.Numerics.IBitwiseOperators.operator ~(System.UInt16 value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(System.UInt16 left, System.UInt16 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(System.UInt16 left, System.UInt16 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(System.UInt16 left, System.UInt16 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(System.UInt16 left, System.UInt16 right) { throw null; } - static System.UInt16 System.Numerics.IDecrementOperators.operator --(System.UInt16 value) { throw null; } - static System.UInt16 System.Numerics.IDivisionOperators.operator /(System.UInt16 left, System.UInt16 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator ==(System.UInt16 left, System.UInt16 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator !=(System.UInt16 left, System.UInt16 right) { throw null; } - static System.UInt16 System.Numerics.IIncrementOperators.operator ++(System.UInt16 value) { throw null; } - static System.UInt16 System.Numerics.IModulusOperators.operator %(System.UInt16 left, System.UInt16 right) { throw null; } - static System.UInt16 System.Numerics.IMultiplyOperators.operator *(System.UInt16 left, System.UInt16 right) { throw null; } - static System.UInt16 System.Numerics.INumber.Abs(System.UInt16 value) { throw null; } - static System.UInt16 System.Numerics.INumber.CopySign(System.UInt16 value, System.UInt16 sign) { throw null; } - static bool System.Numerics.INumber.IsNegative(System.UInt16 value) { throw null; } - static System.UInt16 System.Numerics.INumber.MaxMagnitude(System.UInt16 x, System.UInt16 y) { throw null; } - static System.UInt16 System.Numerics.INumber.MinMagnitude(System.UInt16 x, System.UInt16 y) { throw null; } - static System.UInt16 System.Numerics.IShiftOperators.operator <<(System.UInt16 value, int shiftAmount) { throw null; } - static System.UInt16 System.Numerics.IShiftOperators.operator >>(System.UInt16 value, int shiftAmount) { throw null; } - static System.UInt16 System.Numerics.ISubtractionOperators.operator -(System.UInt16 left, System.UInt16 right) { throw null; } - static System.UInt16 System.Numerics.IUnaryNegationOperators.operator -(System.UInt16 value) { throw null; } - static System.UInt16 System.Numerics.IUnaryPlusOperators.operator +(System.UInt16 value) { throw null; } + static ushort System.Numerics.IAdditionOperators.operator +(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IAdditionOperators.operator checked +(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IBitwiseOperators.operator &(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IBitwiseOperators.operator |(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IBitwiseOperators.operator ^(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IBitwiseOperators.operator ~(ushort value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(ushort left, ushort right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(ushort left, ushort right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(ushort left, ushort right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IDecrementOperators.operator checked --(ushort value) { throw null; } + static ushort System.Numerics.IDecrementOperators.operator --(ushort value) { throw null; } + static ushort System.Numerics.IDivisionOperators.operator checked /(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IDivisionOperators.operator /(ushort left, ushort right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator ==(ushort left, ushort right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator !=(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IIncrementOperators.operator checked ++(ushort value) { throw null; } + static ushort System.Numerics.IIncrementOperators.operator ++(ushort value) { throw null; } + static ushort System.Numerics.IModulusOperators.operator %(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IMultiplyOperators.operator checked *(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IMultiplyOperators.operator *(ushort left, ushort right) { throw null; } + static ushort System.Numerics.INumber.Abs(ushort value) { throw null; } + static ushort System.Numerics.INumber.CopySign(ushort value, ushort sign) { throw null; } + static bool System.Numerics.INumber.IsNegative(ushort value) { throw null; } + static ushort System.Numerics.INumber.MaxMagnitude(ushort x, ushort y) { throw null; } + static ushort System.Numerics.INumber.MinMagnitude(ushort x, ushort y) { throw null; } + static ushort System.Numerics.IShiftOperators.operator <<(ushort value, int shiftAmount) { throw null; } + static ushort System.Numerics.IShiftOperators.operator >>(ushort value, int shiftAmount) { throw null; } + static ushort System.Numerics.ISubtractionOperators.operator checked -(ushort left, ushort right) { throw null; } + static ushort System.Numerics.ISubtractionOperators.operator -(ushort left, ushort right) { throw null; } + static ushort System.Numerics.IUnaryNegationOperators.operator checked -(ushort value) { throw null; } + static ushort System.Numerics.IUnaryNegationOperators.operator -(ushort value) { throw null; } + static ushort System.Numerics.IUnaryPlusOperators.operator +(ushort value) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } - public static System.UInt16 TrailingZeroCount(System.UInt16 value) { throw null; } - public static bool TryCreate(TOther value, out System.UInt16 result) where TOther : System.Numerics.INumber { throw null; } + public static ushort TrailingZeroCount(ushort value) { throw null; } + public static bool TryCreate(TOther value, out ushort result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.UInt16 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.UInt16 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.UInt16 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.UInt16 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.UInt16 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.UInt16 result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out ushort result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out ushort result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out ushort result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out ushort result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out ushort result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out ushort result) { throw null; } } [System.CLSCompliantAttribute(false)] public readonly partial struct UInt32 : System.IComparable, System.IComparable, System.IConvertible, System.IEquatable, System.IFormattable, System.IParsable, System.ISpanFormattable, System.ISpanParsable, System.Numerics.IAdditionOperators, System.Numerics.IAdditiveIdentity, System.Numerics.IBinaryInteger, System.Numerics.IBinaryNumber, System.Numerics.IBitwiseOperators, System.Numerics.IComparisonOperators, System.Numerics.IDecrementOperators, System.Numerics.IDivisionOperators, System.Numerics.IEqualityOperators, System.Numerics.IIncrementOperators, System.Numerics.IMinMaxValue, System.Numerics.IModulusOperators, System.Numerics.IMultiplicativeIdentity, System.Numerics.IMultiplyOperators, System.Numerics.INumber, System.Numerics.INumberBase, System.Numerics.IShiftOperators, System.Numerics.ISubtractionOperators, System.Numerics.IUnaryNegationOperators, System.Numerics.IUnaryPlusOperators, System.Numerics.IUnsignedNumber @@ -5491,32 +5588,32 @@ public TypeUnloadedException(string? message, System.Exception? innerException) static uint System.Numerics.IMultiplicativeIdentity.MultiplicativeIdentity { get { throw null; } } static uint System.Numerics.INumberBase.One { get { throw null; } } static uint System.Numerics.INumberBase.Zero { get { throw null; } } - public static System.UInt32 Clamp(System.UInt32 value, System.UInt32 min, System.UInt32 max) { throw null; } + public static uint Clamp(uint value, uint min, uint max) { throw null; } public int CompareTo(object? value) { throw null; } - public int CompareTo(System.UInt32 value) { throw null; } - public static System.UInt32 CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.UInt32 CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.UInt32 CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static (uint Quotient, uint Remainder) DivRem(System.UInt32 left, System.UInt32 right) { throw null; } + public int CompareTo(uint value) { throw null; } + public static uint CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static uint CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static uint CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static (uint Quotient, uint Remainder) DivRem(uint left, uint right) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } - public bool Equals(System.UInt32 obj) { throw null; } + public bool Equals(uint obj) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static bool IsPow2(System.UInt32 value) { throw null; } - public static System.UInt32 LeadingZeroCount(System.UInt32 value) { throw null; } - public static System.UInt32 Log2(System.UInt32 value) { throw null; } - public static System.UInt32 Max(System.UInt32 x, System.UInt32 y) { throw null; } - public static System.UInt32 Min(System.UInt32 x, System.UInt32 y) { throw null; } - public static System.UInt32 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } - public static System.UInt32 Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.UInt32 Parse(string s) { throw null; } - public static System.UInt32 Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.UInt32 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.UInt32 Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.UInt32 PopCount(System.UInt32 value) { throw null; } - public static System.UInt32 RotateLeft(System.UInt32 value, int rotateAmount) { throw null; } - public static System.UInt32 RotateRight(System.UInt32 value, int rotateAmount) { throw null; } - public static int Sign(System.UInt32 value) { throw null; } + public static bool IsPow2(uint value) { throw null; } + public static uint LeadingZeroCount(uint value) { throw null; } + public static uint Log2(uint value) { throw null; } + public static uint Max(uint x, uint y) { throw null; } + public static uint Min(uint x, uint y) { throw null; } + public static uint Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } + public static uint Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static uint Parse(string s) { throw null; } + public static uint Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static uint Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static uint Parse(string s, System.IFormatProvider? provider) { throw null; } + public static uint PopCount(uint value) { throw null; } + public static uint RotateLeft(uint value, int rotateAmount) { throw null; } + public static uint RotateRight(uint value, int rotateAmount) { throw null; } + public static int Sign(uint value) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } @@ -5530,47 +5627,54 @@ public TypeUnloadedException(string? message, System.Exception? innerException) float System.IConvertible.ToSingle(System.IFormatProvider? provider) { throw null; } object System.IConvertible.ToType(System.Type type, System.IFormatProvider? provider) { throw null; } ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } - System.UInt32 System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } + uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } - static System.UInt32 System.Numerics.IAdditionOperators.operator +(System.UInt32 left, System.UInt32 right) { throw null; } - static System.UInt32 System.Numerics.IBitwiseOperators.operator &(System.UInt32 left, System.UInt32 right) { throw null; } - static System.UInt32 System.Numerics.IBitwiseOperators.operator |(System.UInt32 left, System.UInt32 right) { throw null; } - static System.UInt32 System.Numerics.IBitwiseOperators.operator ^(System.UInt32 left, System.UInt32 right) { throw null; } - static System.UInt32 System.Numerics.IBitwiseOperators.operator ~(System.UInt32 value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(System.UInt32 left, System.UInt32 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(System.UInt32 left, System.UInt32 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(System.UInt32 left, System.UInt32 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(System.UInt32 left, System.UInt32 right) { throw null; } - static System.UInt32 System.Numerics.IDecrementOperators.operator --(System.UInt32 value) { throw null; } - static System.UInt32 System.Numerics.IDivisionOperators.operator /(System.UInt32 left, System.UInt32 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator ==(System.UInt32 left, System.UInt32 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator !=(System.UInt32 left, System.UInt32 right) { throw null; } - static System.UInt32 System.Numerics.IIncrementOperators.operator ++(System.UInt32 value) { throw null; } - static System.UInt32 System.Numerics.IModulusOperators.operator %(System.UInt32 left, System.UInt32 right) { throw null; } - static System.UInt32 System.Numerics.IMultiplyOperators.operator *(System.UInt32 left, System.UInt32 right) { throw null; } - static System.UInt32 System.Numerics.INumber.Abs(System.UInt32 value) { throw null; } - static System.UInt32 System.Numerics.INumber.CopySign(System.UInt32 value, System.UInt32 sign) { throw null; } - static bool System.Numerics.INumber.IsNegative(System.UInt32 value) { throw null; } - static System.UInt32 System.Numerics.INumber.MaxMagnitude(System.UInt32 x, System.UInt32 y) { throw null; } - static System.UInt32 System.Numerics.INumber.MinMagnitude(System.UInt32 x, System.UInt32 y) { throw null; } - static System.UInt32 System.Numerics.IShiftOperators.operator <<(System.UInt32 value, int shiftAmount) { throw null; } - static System.UInt32 System.Numerics.IShiftOperators.operator >>(System.UInt32 value, int shiftAmount) { throw null; } - static System.UInt32 System.Numerics.ISubtractionOperators.operator -(System.UInt32 left, System.UInt32 right) { throw null; } - static System.UInt32 System.Numerics.IUnaryNegationOperators.operator -(System.UInt32 value) { throw null; } - static System.UInt32 System.Numerics.IUnaryPlusOperators.operator +(System.UInt32 value) { throw null; } + static uint System.Numerics.IAdditionOperators.operator +(uint left, uint right) { throw null; } + static uint System.Numerics.IAdditionOperators.operator checked +(uint left, uint right) { throw null; } + static uint System.Numerics.IBitwiseOperators.operator &(uint left, uint right) { throw null; } + static uint System.Numerics.IBitwiseOperators.operator |(uint left, uint right) { throw null; } + static uint System.Numerics.IBitwiseOperators.operator ^(uint left, uint right) { throw null; } + static uint System.Numerics.IBitwiseOperators.operator ~(uint value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(uint left, uint right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(uint left, uint right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(uint left, uint right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(uint left, uint right) { throw null; } + static uint System.Numerics.IDecrementOperators.operator checked --(uint value) { throw null; } + static uint System.Numerics.IDecrementOperators.operator --(uint value) { throw null; } + static uint System.Numerics.IDivisionOperators.operator checked /(uint left, uint right) { throw null; } + static uint System.Numerics.IDivisionOperators.operator /(uint left, uint right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator ==(uint left, uint right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator !=(uint left, uint right) { throw null; } + static uint System.Numerics.IIncrementOperators.operator checked ++(uint value) { throw null; } + static uint System.Numerics.IIncrementOperators.operator ++(uint value) { throw null; } + static uint System.Numerics.IModulusOperators.operator %(uint left, uint right) { throw null; } + static uint System.Numerics.IMultiplyOperators.operator checked *(uint left, uint right) { throw null; } + static uint System.Numerics.IMultiplyOperators.operator *(uint left, uint right) { throw null; } + static uint System.Numerics.INumber.Abs(uint value) { throw null; } + static uint System.Numerics.INumber.CopySign(uint value, uint sign) { throw null; } + static bool System.Numerics.INumber.IsNegative(uint value) { throw null; } + static uint System.Numerics.INumber.MaxMagnitude(uint x, uint y) { throw null; } + static uint System.Numerics.INumber.MinMagnitude(uint x, uint y) { throw null; } + static uint System.Numerics.IShiftOperators.operator <<(uint value, int shiftAmount) { throw null; } + static uint System.Numerics.IShiftOperators.operator >>(uint value, int shiftAmount) { throw null; } + static uint System.Numerics.ISubtractionOperators.operator checked -(uint left, uint right) { throw null; } + static uint System.Numerics.ISubtractionOperators.operator -(uint left, uint right) { throw null; } + static uint System.Numerics.IUnaryNegationOperators.operator checked -(uint value) { throw null; } + static uint System.Numerics.IUnaryNegationOperators.operator -(uint value) { throw null; } + static uint System.Numerics.IUnaryPlusOperators.operator +(uint value) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } - public static System.UInt32 TrailingZeroCount(System.UInt32 value) { throw null; } - public static bool TryCreate(TOther value, out System.UInt32 result) where TOther : System.Numerics.INumber { throw null; } + public static uint TrailingZeroCount(uint value) { throw null; } + public static bool TryCreate(TOther value, out uint result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.UInt32 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.UInt32 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.UInt32 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.UInt32 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.UInt32 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.UInt32 result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out uint result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out uint result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out uint result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out uint result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out uint result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out uint result) { throw null; } } [System.CLSCompliantAttribute(false)] public readonly partial struct UInt64 : System.IComparable, System.IComparable, System.IConvertible, System.IEquatable, System.IFormattable, System.IParsable, System.ISpanFormattable, System.ISpanParsable, System.Numerics.IAdditionOperators, System.Numerics.IAdditiveIdentity, System.Numerics.IBinaryInteger, System.Numerics.IBinaryNumber, System.Numerics.IBitwiseOperators, System.Numerics.IComparisonOperators, System.Numerics.IDecrementOperators, System.Numerics.IDivisionOperators, System.Numerics.IEqualityOperators, System.Numerics.IIncrementOperators, System.Numerics.IMinMaxValue, System.Numerics.IModulusOperators, System.Numerics.IMultiplicativeIdentity, System.Numerics.IMultiplyOperators, System.Numerics.INumber, System.Numerics.INumberBase, System.Numerics.IShiftOperators, System.Numerics.ISubtractionOperators, System.Numerics.IUnaryNegationOperators, System.Numerics.IUnaryPlusOperators, System.Numerics.IUnsignedNumber @@ -5584,32 +5688,32 @@ public TypeUnloadedException(string? message, System.Exception? innerException) static ulong System.Numerics.IMultiplicativeIdentity.MultiplicativeIdentity { get { throw null; } } static ulong System.Numerics.INumberBase.One { get { throw null; } } static ulong System.Numerics.INumberBase.Zero { get { throw null; } } - public static System.UInt64 Clamp(System.UInt64 value, System.UInt64 min, System.UInt64 max) { throw null; } + public static ulong Clamp(ulong value, ulong min, ulong max) { throw null; } public int CompareTo(object? value) { throw null; } - public int CompareTo(System.UInt64 value) { throw null; } - public static System.UInt64 CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.UInt64 CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static System.UInt64 CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } - public static (ulong Quotient, ulong Remainder) DivRem(System.UInt64 left, System.UInt64 right) { throw null; } + public int CompareTo(ulong value) { throw null; } + public static ulong CreateChecked(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static ulong CreateSaturating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static ulong CreateTruncating(TOther value) where TOther : System.Numerics.INumber { throw null; } + public static (ulong Quotient, ulong Remainder) DivRem(ulong left, ulong right) { throw null; } public override bool Equals([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] object? obj) { throw null; } - public bool Equals(System.UInt64 obj) { throw null; } + public bool Equals(ulong obj) { throw null; } public override int GetHashCode() { throw null; } public System.TypeCode GetTypeCode() { throw null; } - public static bool IsPow2(System.UInt64 value) { throw null; } - public static System.UInt64 LeadingZeroCount(System.UInt64 value) { throw null; } - public static System.UInt64 Log2(System.UInt64 value) { throw null; } - public static System.UInt64 Max(System.UInt64 x, System.UInt64 y) { throw null; } - public static System.UInt64 Min(System.UInt64 x, System.UInt64 y) { throw null; } - public static System.UInt64 Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } - public static System.UInt64 Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } - public static System.UInt64 Parse(string s) { throw null; } - public static System.UInt64 Parse(string s, System.Globalization.NumberStyles style) { throw null; } - public static System.UInt64 Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } - public static System.UInt64 Parse(string s, System.IFormatProvider? provider) { throw null; } - public static System.UInt64 PopCount(System.UInt64 value) { throw null; } - public static System.UInt64 RotateLeft(System.UInt64 value, int rotateAmount) { throw null; } - public static System.UInt64 RotateRight(System.UInt64 value, int rotateAmount) { throw null; } - public static int Sign(System.UInt64 value) { throw null; } + public static bool IsPow2(ulong value) { throw null; } + public static ulong LeadingZeroCount(ulong value) { throw null; } + public static ulong Log2(ulong value) { throw null; } + public static ulong Max(ulong x, ulong y) { throw null; } + public static ulong Min(ulong x, ulong y) { throw null; } + public static ulong Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style = System.Globalization.NumberStyles.Integer, System.IFormatProvider? provider = null) { throw null; } + public static ulong Parse(System.ReadOnlySpan s, System.IFormatProvider? provider) { throw null; } + public static ulong Parse(string s) { throw null; } + public static ulong Parse(string s, System.Globalization.NumberStyles style) { throw null; } + public static ulong Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } + public static ulong Parse(string s, System.IFormatProvider? provider) { throw null; } + public static ulong PopCount(ulong value) { throw null; } + public static ulong RotateLeft(ulong value, int rotateAmount) { throw null; } + public static ulong RotateRight(ulong value, int rotateAmount) { throw null; } + public static int Sign(ulong value) { throw null; } bool System.IConvertible.ToBoolean(System.IFormatProvider? provider) { throw null; } byte System.IConvertible.ToByte(System.IFormatProvider? provider) { throw null; } char System.IConvertible.ToChar(System.IFormatProvider? provider) { throw null; } @@ -5624,46 +5728,53 @@ public TypeUnloadedException(string? message, System.Exception? innerException) object System.IConvertible.ToType(System.Type type, System.IFormatProvider? provider) { throw null; } ushort System.IConvertible.ToUInt16(System.IFormatProvider? provider) { throw null; } uint System.IConvertible.ToUInt32(System.IFormatProvider? provider) { throw null; } - System.UInt64 System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } - static System.UInt64 System.Numerics.IAdditionOperators.operator +(System.UInt64 left, System.UInt64 right) { throw null; } - static System.UInt64 System.Numerics.IBitwiseOperators.operator &(System.UInt64 left, System.UInt64 right) { throw null; } - static System.UInt64 System.Numerics.IBitwiseOperators.operator |(System.UInt64 left, System.UInt64 right) { throw null; } - static System.UInt64 System.Numerics.IBitwiseOperators.operator ^(System.UInt64 left, System.UInt64 right) { throw null; } - static System.UInt64 System.Numerics.IBitwiseOperators.operator ~(System.UInt64 value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(System.UInt64 left, System.UInt64 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(System.UInt64 left, System.UInt64 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(System.UInt64 left, System.UInt64 right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(System.UInt64 left, System.UInt64 right) { throw null; } - static System.UInt64 System.Numerics.IDecrementOperators.operator --(System.UInt64 value) { throw null; } - static System.UInt64 System.Numerics.IDivisionOperators.operator /(System.UInt64 left, System.UInt64 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator ==(System.UInt64 left, System.UInt64 right) { throw null; } - static bool System.Numerics.IEqualityOperators.operator !=(System.UInt64 left, System.UInt64 right) { throw null; } - static System.UInt64 System.Numerics.IIncrementOperators.operator ++(System.UInt64 value) { throw null; } - static System.UInt64 System.Numerics.IModulusOperators.operator %(System.UInt64 left, System.UInt64 right) { throw null; } - static System.UInt64 System.Numerics.IMultiplyOperators.operator *(System.UInt64 left, System.UInt64 right) { throw null; } - static System.UInt64 System.Numerics.INumber.Abs(System.UInt64 value) { throw null; } - static System.UInt64 System.Numerics.INumber.CopySign(System.UInt64 value, System.UInt64 sign) { throw null; } - static bool System.Numerics.INumber.IsNegative(System.UInt64 value) { throw null; } - static System.UInt64 System.Numerics.INumber.MaxMagnitude(System.UInt64 x, System.UInt64 y) { throw null; } - static System.UInt64 System.Numerics.INumber.MinMagnitude(System.UInt64 x, System.UInt64 y) { throw null; } - static System.UInt64 System.Numerics.IShiftOperators.operator <<(System.UInt64 value, int shiftAmount) { throw null; } - static System.UInt64 System.Numerics.IShiftOperators.operator >>(System.UInt64 value, int shiftAmount) { throw null; } - static System.UInt64 System.Numerics.ISubtractionOperators.operator -(System.UInt64 left, System.UInt64 right) { throw null; } - static System.UInt64 System.Numerics.IUnaryNegationOperators.operator -(System.UInt64 value) { throw null; } - static System.UInt64 System.Numerics.IUnaryPlusOperators.operator +(System.UInt64 value) { throw null; } + ulong System.IConvertible.ToUInt64(System.IFormatProvider? provider) { throw null; } + static ulong System.Numerics.IAdditionOperators.operator +(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IAdditionOperators.operator checked +(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IBitwiseOperators.operator &(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IBitwiseOperators.operator |(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IBitwiseOperators.operator ^(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IBitwiseOperators.operator ~(ulong value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(ulong left, ulong right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(ulong left, ulong right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(ulong left, ulong right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IDecrementOperators.operator checked --(ulong value) { throw null; } + static ulong System.Numerics.IDecrementOperators.operator --(ulong value) { throw null; } + static ulong System.Numerics.IDivisionOperators.operator checked /(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IDivisionOperators.operator /(ulong left, ulong right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator ==(ulong left, ulong right) { throw null; } + static bool System.Numerics.IEqualityOperators.operator !=(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IIncrementOperators.operator checked ++(ulong value) { throw null; } + static ulong System.Numerics.IIncrementOperators.operator ++(ulong value) { throw null; } + static ulong System.Numerics.IModulusOperators.operator %(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IMultiplyOperators.operator checked *(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IMultiplyOperators.operator *(ulong left, ulong right) { throw null; } + static ulong System.Numerics.INumber.Abs(ulong value) { throw null; } + static ulong System.Numerics.INumber.CopySign(ulong value, ulong sign) { throw null; } + static bool System.Numerics.INumber.IsNegative(ulong value) { throw null; } + static ulong System.Numerics.INumber.MaxMagnitude(ulong x, ulong y) { throw null; } + static ulong System.Numerics.INumber.MinMagnitude(ulong x, ulong y) { throw null; } + static ulong System.Numerics.IShiftOperators.operator <<(ulong value, int shiftAmount) { throw null; } + static ulong System.Numerics.IShiftOperators.operator >>(ulong value, int shiftAmount) { throw null; } + static ulong System.Numerics.ISubtractionOperators.operator checked -(ulong left, ulong right) { throw null; } + static ulong System.Numerics.ISubtractionOperators.operator -(ulong left, ulong right) { throw null; } + static ulong System.Numerics.IUnaryNegationOperators.operator checked -(ulong value) { throw null; } + static ulong System.Numerics.IUnaryNegationOperators.operator -(ulong value) { throw null; } + static ulong System.Numerics.IUnaryPlusOperators.operator +(ulong value) { throw null; } public override string ToString() { throw null; } public string ToString(System.IFormatProvider? provider) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format) { throw null; } public string ToString([System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] string? format, System.IFormatProvider? provider) { throw null; } - public static System.UInt64 TrailingZeroCount(System.UInt64 value) { throw null; } - public static bool TryCreate(TOther value, out System.UInt64 result) where TOther : System.Numerics.INumber { throw null; } + public static ulong TrailingZeroCount(ulong value) { throw null; } + public static bool TryCreate(TOther value, out ulong result) where TOther : System.Numerics.INumber { throw null; } public bool TryFormat(System.Span destination, out int charsWritten, [System.Diagnostics.CodeAnalysis.StringSyntaxAttribute("NumericFormat")] System.ReadOnlySpan format = default(System.ReadOnlySpan), System.IFormatProvider? provider = null) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.UInt64 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out System.UInt64 result) { throw null; } - public static bool TryParse(System.ReadOnlySpan s, out System.UInt64 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out System.UInt64 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out System.UInt64 result) { throw null; } - public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out System.UInt64 result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out ulong result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, System.IFormatProvider? provider, out ulong result) { throw null; } + public static bool TryParse(System.ReadOnlySpan s, out ulong result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out ulong result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.IFormatProvider? provider, out ulong result) { throw null; } + public static bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, out ulong result) { throw null; } } [System.CLSCompliantAttribute(false)] public readonly partial struct UIntPtr : System.IComparable, System.IComparable, System.IEquatable, System.IFormattable, System.IParsable, System.ISpanFormattable, System.ISpanParsable, System.Numerics.IAdditionOperators, System.Numerics.IAdditiveIdentity, System.Numerics.IBinaryInteger, System.Numerics.IBinaryNumber, System.Numerics.IBitwiseOperators, System.Numerics.IComparisonOperators, System.Numerics.IDecrementOperators, System.Numerics.IDivisionOperators, System.Numerics.IEqualityOperators, System.Numerics.IIncrementOperators, System.Numerics.IMinMaxValue, System.Numerics.IModulusOperators, System.Numerics.IMultiplicativeIdentity, System.Numerics.IMultiplyOperators, System.Numerics.INumber, System.Numerics.INumberBase, System.Numerics.IShiftOperators, System.Numerics.ISubtractionOperators, System.Numerics.IUnaryNegationOperators, System.Numerics.IUnaryPlusOperators, System.Numerics.IUnsignedNumber, System.Runtime.Serialization.ISerializable @@ -5705,7 +5816,8 @@ public TypeUnloadedException(string? message, System.Exception? innerException) public static System.UIntPtr Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider) { throw null; } public static System.UIntPtr Parse(string s, System.IFormatProvider? provider) { throw null; } public static System.UIntPtr Subtract(System.UIntPtr pointer, int offset) { throw null; } - static nuint System.Numerics.IAdditionOperators.operator +(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IAdditionOperators.operator +(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IAdditionOperators.operator checked +(nuint left, nuint right) { throw null; } static (nuint Quotient, nuint Remainder) System.Numerics.IBinaryInteger.DivRem(nuint left, nuint right) { throw null; } static nuint System.Numerics.IBinaryInteger.LeadingZeroCount(nuint value) { throw null; } static nuint System.Numerics.IBinaryInteger.PopCount(nuint value) { throw null; } @@ -5714,19 +5826,23 @@ public TypeUnloadedException(string? message, System.Exception? innerException) static nuint System.Numerics.IBinaryInteger.TrailingZeroCount(nuint value) { throw null; } static bool System.Numerics.IBinaryNumber.IsPow2(nuint value) { throw null; } static nuint System.Numerics.IBinaryNumber.Log2(nuint value) { throw null; } - static nuint System.Numerics.IBitwiseOperators.operator &(nuint left, nuint right) { throw null; } - static nuint System.Numerics.IBitwiseOperators.operator |(nuint left, nuint right) { throw null; } - static nuint System.Numerics.IBitwiseOperators.operator ^(nuint left, nuint right) { throw null; } - static nuint System.Numerics.IBitwiseOperators.operator ~(nuint value) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >(nuint left, nuint right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator >=(nuint left, nuint right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <(nuint left, nuint right) { throw null; } - static bool System.Numerics.IComparisonOperators.operator <=(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IBitwiseOperators.operator &(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IBitwiseOperators.operator |(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IBitwiseOperators.operator ^(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IBitwiseOperators.operator ~(nuint value) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >(nuint left, nuint right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator >=(nuint left, nuint right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <(nuint left, nuint right) { throw null; } + static bool System.Numerics.IComparisonOperators.operator <=(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IDecrementOperators.operator checked --(nuint value) { throw null; } static nuint System.Numerics.IDecrementOperators.operator --(nuint value) { throw null; } - static nuint System.Numerics.IDivisionOperators.operator /(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IDivisionOperators.operator checked /(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IDivisionOperators.operator /(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IIncrementOperators.operator checked ++(nuint value) { throw null; } static nuint System.Numerics.IIncrementOperators.operator ++(nuint value) { throw null; } - static nuint System.Numerics.IModulusOperators.operator %(nuint left, nuint right) { throw null; } - static nuint System.Numerics.IMultiplyOperators.operator *(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IModulusOperators.operator %(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IMultiplyOperators.operator checked *(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IMultiplyOperators.operator *(nuint left, nuint right) { throw null; } static nuint System.Numerics.INumber.Abs(nuint value) { throw null; } static nuint System.Numerics.INumber.Clamp(nuint value, nuint min, nuint max) { throw null; } static nuint System.Numerics.INumber.CopySign(nuint value, nuint sign) { throw null; } @@ -5740,11 +5856,13 @@ public TypeUnloadedException(string? message, System.Exception? innerException) static nuint System.Numerics.INumber.MinMagnitude(nuint x, nuint y) { throw null; } static int System.Numerics.INumber.Sign(nuint value) { throw null; } static bool System.Numerics.INumber.TryCreate(TOther value, out nuint result) { throw null; } - static nuint System.Numerics.IShiftOperators.operator <<(nuint value, int shiftAmount) { throw null; } - static nuint System.Numerics.IShiftOperators.operator >>(nuint value, int shiftAmount) { throw null; } - static nuint System.Numerics.ISubtractionOperators.operator -(nuint left, nuint right) { throw null; } - static nuint System.Numerics.IUnaryNegationOperators.operator -(nuint value) { throw null; } - static nuint System.Numerics.IUnaryPlusOperators.operator +(nuint value) { throw null; } + static nuint System.Numerics.IShiftOperators.operator <<(nuint value, int shiftAmount) { throw null; } + static nuint System.Numerics.IShiftOperators.operator >>(nuint value, int shiftAmount) { throw null; } + static nuint System.Numerics.ISubtractionOperators.operator checked -(nuint left, nuint right) { throw null; } + static nuint System.Numerics.ISubtractionOperators.operator -(nuint left, nuint right) { throw null; } + static nuint System.Numerics.IUnaryNegationOperators.operator checked -(nuint value) { throw null; } + static nuint System.Numerics.IUnaryNegationOperators.operator -(nuint value) { throw null; } + static nuint System.Numerics.IUnaryPlusOperators.operator +(nuint value) { throw null; } void System.Runtime.Serialization.ISerializable.GetObjectData(System.Runtime.Serialization.SerializationInfo info, System.Runtime.Serialization.StreamingContext context) { } public unsafe void* ToPointer() { throw null; } public override string ToString() { throw null; } @@ -9340,6 +9458,7 @@ public static partial class BitOperations public partial interface IAdditionOperators where TSelf : System.Numerics.IAdditionOperators { static abstract TResult operator +(TSelf left, TOther right); + static abstract TResult operator checked +(TSelf left, TOther right); } public partial interface IAdditiveIdentity where TSelf : System.Numerics.IAdditiveIdentity { @@ -9378,10 +9497,12 @@ public partial interface IComparisonOperators : System.IComparabl } public partial interface IDecrementOperators where TSelf : System.Numerics.IDecrementOperators { + static abstract TSelf operator checked --(TSelf value); static abstract TSelf operator --(TSelf value); } public partial interface IDivisionOperators where TSelf : System.Numerics.IDivisionOperators { + static abstract TResult operator checked /(TSelf left, TOther right); static abstract TResult operator /(TSelf left, TOther right); } public partial interface IEqualityOperators : System.IEquatable where TSelf : System.Numerics.IEqualityOperators @@ -9440,6 +9561,7 @@ public partial interface IHyperbolicFunctions where TSelf : System.Numeri } public partial interface IIncrementOperators where TSelf : System.Numerics.IIncrementOperators { + static abstract TSelf operator checked ++(TSelf value); static abstract TSelf operator ++(TSelf value); } public partial interface ILogarithmicFunctions where TSelf : System.Numerics.ILogarithmicFunctions @@ -9464,6 +9586,7 @@ public partial interface IMultiplicativeIdentity where TSelf : S } public partial interface IMultiplyOperators where TSelf : System.Numerics.IMultiplyOperators { + static abstract TResult operator checked *(TSelf left, TOther right); static abstract TResult operator *(TSelf left, TOther right); } public partial interface INumberBase : System.IEquatable, System.IFormattable, System.ISpanFormattable, System.Numerics.IAdditionOperators, System.Numerics.IAdditiveIdentity, System.Numerics.IDecrementOperators, System.Numerics.IDivisionOperators, System.Numerics.IEqualityOperators, System.Numerics.IIncrementOperators, System.Numerics.IMultiplicativeIdentity, System.Numerics.IMultiplyOperators, System.Numerics.ISubtractionOperators, System.Numerics.IUnaryNegationOperators, System.Numerics.IUnaryPlusOperators where TSelf : System.Numerics.INumberBase @@ -9476,9 +9599,9 @@ public partial interface INumber : System.IComparable, System.IComparable static abstract TSelf Abs(TSelf value); static abstract TSelf Clamp(TSelf value, TSelf min, TSelf max); static abstract TSelf CopySign(TSelf value, TSelf sign); - static abstract TSelf CreateChecked(TOther value) where TOther : System.Numerics.INumber; - static abstract TSelf CreateSaturating(TOther value) where TOther : System.Numerics.INumber; - static abstract TSelf CreateTruncating(TOther value) where TOther : System.Numerics.INumber; + static abstract TSelf CreateChecked(TOther value) where TOther : INumber; + static abstract TSelf CreateSaturating(TOther value) where TOther : INumber; + static abstract TSelf CreateTruncating(TOther value) where TOther : INumber; static abstract bool IsNegative(TSelf value); static abstract TSelf Max(TSelf x, TSelf y); static abstract TSelf MaxMagnitude(TSelf x, TSelf y); @@ -9487,7 +9610,7 @@ public partial interface INumber : System.IComparable, System.IComparable static abstract TSelf Parse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider); static abstract TSelf Parse(string s, System.Globalization.NumberStyles style, System.IFormatProvider? provider); static abstract int Sign(TSelf value); - static abstract bool TryCreate(TOther value, out TSelf result) where TOther : System.Numerics.INumber; + static abstract bool TryCreate(TOther value, out TSelf result) where TOther : INumber; static abstract bool TryParse(System.ReadOnlySpan s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out TSelf result); static abstract bool TryParse([System.Diagnostics.CodeAnalysis.NotNullWhenAttribute(true)] string? s, System.Globalization.NumberStyles style, System.IFormatProvider? provider, out TSelf result); } @@ -9511,6 +9634,7 @@ public partial interface ISignedNumber where TSelf : System.Numerics.INum } public partial interface ISubtractionOperators where TSelf : System.Numerics.ISubtractionOperators { + static abstract TResult operator checked -(TSelf left, TOther right); static abstract TResult operator -(TSelf left, TOther right); } public partial interface ITrigonometricFunctions where TSelf : System.Numerics.ITrigonometricFunctions @@ -9526,6 +9650,7 @@ public partial interface ITrigonometricFunctions where TSelf : System.Num } public partial interface IUnaryNegationOperators where TSelf : System.Numerics.IUnaryNegationOperators { + static abstract TResult operator checked -(TSelf value); static abstract TResult operator -(TSelf value); } public partial interface IUnaryPlusOperators where TSelf : System.Numerics.IUnaryPlusOperators From ea27d1c42a2c5608b6b65bcd48e03b4c8ebeed96 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Thu, 7 Apr 2022 10:28:27 -0700 Subject: [PATCH 4/7] Adding tests covering user-defined checked operators in generic math --- .../tests/System/ByteTests.GenericMath.cs | 83 ++++++++- .../tests/System/CharTests.GenericMath.cs | 83 ++++++++- .../tests/System/GenericMathHelpers.cs | 25 ++- .../tests/System/Int16Tests.GenericMath.cs | 83 ++++++++- .../tests/System/Int32Tests.GenericMath.cs | 83 ++++++++- .../tests/System/Int64Tests.GenericMath.cs | 83 ++++++++- .../tests/System/IntPtrTests.GenericMath.cs | 173 +++++++++++++++++- .../tests/System/SByteTests.GenericMath.cs | 83 ++++++++- .../tests/System/UInt16Tests.GenericMath.cs | 83 ++++++++- .../tests/System/UInt32Tests.GenericMath.cs | 84 ++++++++- .../tests/System/UInt64Tests.GenericMath.cs | 83 ++++++++- .../tests/System/UIntPtrTests.GenericMath.cs | 172 ++++++++++++++++- 12 files changed, 1101 insertions(+), 17 deletions(-) diff --git a/src/libraries/System.Runtime/tests/System/ByteTests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/ByteTests.GenericMath.cs index 5db2398690f73..797a93047e202 100644 --- a/src/libraries/System.Runtime/tests/System/ByteTests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/ByteTests.GenericMath.cs @@ -55,6 +55,17 @@ public static void op_AdditionTest() Assert.Equal((byte)0x00, AdditionOperatorsHelper.op_Addition((byte)0xFF, (byte)1)); } + [Fact] + public static void op_CheckedAdditionTest() + { + Assert.Equal((byte)0x01, AdditionOperatorsHelper.op_CheckedAddition((byte)0x00, (byte)1)); + Assert.Equal((byte)0x02, AdditionOperatorsHelper.op_CheckedAddition((byte)0x01, (byte)1)); + Assert.Equal((byte)0x80, AdditionOperatorsHelper.op_CheckedAddition((byte)0x7F, (byte)1)); + Assert.Equal((byte)0x81, AdditionOperatorsHelper.op_CheckedAddition((byte)0x80, (byte)1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((byte)0xFF, (byte)1)); + } + [Fact] public static void LeadingZeroCountTest() { @@ -215,6 +226,17 @@ public static void op_DecrementTest() Assert.Equal((byte)0xFE, DecrementOperatorsHelper.op_Decrement((byte)0xFF)); } + [Fact] + public static void op_CheckedDecrementTest() + { + Assert.Equal((byte)0x00, DecrementOperatorsHelper.op_CheckedDecrement((byte)0x01)); + Assert.Equal((byte)0x7E, DecrementOperatorsHelper.op_CheckedDecrement((byte)0x7F)); + Assert.Equal((byte)0x7F, DecrementOperatorsHelper.op_Decrement((byte)0x80)); + Assert.Equal((byte)0xFE, DecrementOperatorsHelper.op_CheckedDecrement((byte)0xFF)); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement((byte)0x00)); + } + [Fact] public static void op_DivisionTest() { @@ -223,6 +245,20 @@ public static void op_DivisionTest() Assert.Equal((byte)0x3F, DivisionOperatorsHelper.op_Division((byte)0x7F, (byte)2)); Assert.Equal((byte)0x40, DivisionOperatorsHelper.op_Division((byte)0x80, (byte)2)); Assert.Equal((byte)0x7F, DivisionOperatorsHelper.op_Division((byte)0xFF, (byte)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((byte)0x01, (byte)0)); + } + + [Fact] + public static void op_CheckedDivisionTest() + { + Assert.Equal((byte)0x00, DivisionOperatorsHelper.op_CheckedDivision((byte)0x00, (byte)2)); + Assert.Equal((byte)0x00, DivisionOperatorsHelper.op_CheckedDivision((byte)0x01, (byte)2)); + Assert.Equal((byte)0x3F, DivisionOperatorsHelper.op_CheckedDivision((byte)0x7F, (byte)2)); + Assert.Equal((byte)0x40, DivisionOperatorsHelper.op_CheckedDivision((byte)0x80, (byte)2)); + Assert.Equal((byte)0x7F, DivisionOperatorsHelper.op_CheckedDivision((byte)0xFF, (byte)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((byte)0x01, (byte)0)); } [Fact] @@ -255,6 +291,17 @@ public static void op_IncrementTest() Assert.Equal((byte)0x00, IncrementOperatorsHelper.op_Increment((byte)0xFF)); } + [Fact] + public static void op_CheckedIncrementTest() + { + Assert.Equal((byte)0x01, IncrementOperatorsHelper.op_CheckedIncrement((byte)0x00)); + Assert.Equal((byte)0x02, IncrementOperatorsHelper.op_CheckedIncrement((byte)0x01)); + Assert.Equal((byte)0x80, IncrementOperatorsHelper.op_Increment((byte)0x7F)); + Assert.Equal((byte)0x81, IncrementOperatorsHelper.op_CheckedIncrement((byte)0x80)); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((byte)0xFF)); + } + [Fact] public static void op_ModulusTest() { @@ -263,6 +310,8 @@ public static void op_ModulusTest() Assert.Equal((byte)0x01, ModulusOperatorsHelper.op_Modulus((byte)0x7F, (byte)2)); Assert.Equal((byte)0x00, ModulusOperatorsHelper.op_Modulus((byte)0x80, (byte)2)); Assert.Equal((byte)0x01, ModulusOperatorsHelper.op_Modulus((byte)0xFF, (byte)2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((byte)0x01, (byte)0)); } [Fact] @@ -275,6 +324,17 @@ public static void op_MultiplyTest() Assert.Equal((byte)0xFE, MultiplyOperatorsHelper.op_Multiply((byte)0xFF, (byte)2)); } + [Fact] + public static void op_CheckedMultiplyTest() + { + Assert.Equal((byte)0x00, MultiplyOperatorsHelper.op_CheckedMultiply((byte)0x00, (byte)2)); + Assert.Equal((byte)0x02, MultiplyOperatorsHelper.op_CheckedMultiply((byte)0x01, (byte)2)); + Assert.Equal((byte)0xFE, MultiplyOperatorsHelper.op_CheckedMultiply((byte)0x7F, (byte)2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((byte)0x80, (byte)2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((byte)0xFF, (byte)2)); + } + [Fact] public static void AbsTest() { @@ -1003,7 +1063,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { Assert.Equal((byte)0x00, ShiftOperatorsHelper.op_LeftShift((byte)0x00, 1)); @@ -1033,6 +1092,17 @@ public static void op_SubtractionTest() Assert.Equal((byte)0xFE, SubtractionOperatorsHelper.op_Subtraction((byte)0xFF, (byte)1)); } + [Fact] + public static void op_CheckedSubtractionTest() + { + Assert.Equal((byte)0x00, SubtractionOperatorsHelper.op_CheckedSubtraction((byte)0x01, (byte)1)); + Assert.Equal((byte)0x7E, SubtractionOperatorsHelper.op_CheckedSubtraction((byte)0x7F, (byte)1)); + Assert.Equal((byte)0x7F, SubtractionOperatorsHelper.op_CheckedSubtraction((byte)0x80, (byte)1)); + Assert.Equal((byte)0xFE, SubtractionOperatorsHelper.op_CheckedSubtraction((byte)0xFF, (byte)1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction((byte)0x00, (byte)1)); + } + [Fact] public static void op_UnaryNegationTest() { @@ -1043,6 +1113,17 @@ public static void op_UnaryNegationTest() Assert.Equal((byte)0x01, UnaryNegationOperatorsHelper.op_UnaryNegation((byte)0xFF)); } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + Assert.Equal((byte)0x00, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((byte)0x00)); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((byte)0x01)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((byte)0x7F)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((byte)0x80)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((byte)0xFF)); + } + [Fact] public static void op_UnaryPlusTest() { diff --git a/src/libraries/System.Runtime/tests/System/CharTests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/CharTests.GenericMath.cs index c3da51ef4c2c9..b162da4c550e4 100644 --- a/src/libraries/System.Runtime/tests/System/CharTests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/CharTests.GenericMath.cs @@ -54,6 +54,17 @@ public static void op_AdditionTest() Assert.Equal((char)0x0000, AdditionOperatorsHelper.op_Addition((char)0xFFFF, (char)1)); } + [Fact] + public static void op_CheckedAdditionTest() + { + Assert.Equal((char)0x0001, AdditionOperatorsHelper.op_CheckedAddition((char)0x0000, (char)1)); + Assert.Equal((char)0x0002, AdditionOperatorsHelper.op_CheckedAddition((char)0x0001, (char)1)); + Assert.Equal((char)0x8000, AdditionOperatorsHelper.op_CheckedAddition((char)0x7FFF, (char)1)); + Assert.Equal((char)0x8001, AdditionOperatorsHelper.op_CheckedAddition((char)0x8000, (char)1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((char)0xFFFF, (char)1)); + } + [Fact] public static void LeadingZeroCountTest() { @@ -214,6 +225,17 @@ public static void op_DecrementTest() Assert.Equal((char)0xFFFE, DecrementOperatorsHelper.op_Decrement((char)0xFFFF)); } + [Fact] + public static void op_CheckedDecrementTest() + { + Assert.Equal((char)0x0000, DecrementOperatorsHelper.op_CheckedDecrement((char)0x0001)); + Assert.Equal((char)0x7FFE, DecrementOperatorsHelper.op_CheckedDecrement((char)0x7FFF)); + Assert.Equal((char)0x7FFF, DecrementOperatorsHelper.op_CheckedDecrement((char)0x8000)); + Assert.Equal((char)0xFFFE, DecrementOperatorsHelper.op_CheckedDecrement((char)0xFFFF)); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement((char)0x0000)); + } + [Fact] public static void op_DivisionTest() { @@ -222,6 +244,20 @@ public static void op_DivisionTest() Assert.Equal((char)0x3FFF, DivisionOperatorsHelper.op_Division((char)0x7FFF, (char)2)); Assert.Equal((char)0x4000, DivisionOperatorsHelper.op_Division((char)0x8000, (char)2)); Assert.Equal((char)0x7FFF, DivisionOperatorsHelper.op_Division((char)0xFFFF, (char)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((char)0x0001, (char)0)); + } + + [Fact] + public static void op_CheckedDivisionTest() + { + Assert.Equal((char)0x0000, DivisionOperatorsHelper.op_CheckedDivision((char)0x0000, (char)2)); + Assert.Equal((char)0x0000, DivisionOperatorsHelper.op_CheckedDivision((char)0x0001, (char)2)); + Assert.Equal((char)0x3FFF, DivisionOperatorsHelper.op_CheckedDivision((char)0x7FFF, (char)2)); + Assert.Equal((char)0x4000, DivisionOperatorsHelper.op_CheckedDivision((char)0x8000, (char)2)); + Assert.Equal((char)0x7FFF, DivisionOperatorsHelper.op_CheckedDivision((char)0xFFFF, (char)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((char)0x0001, (char)0)); } [Fact] @@ -254,6 +290,17 @@ public static void op_IncrementTest() Assert.Equal((char)0x0000, IncrementOperatorsHelper.op_Increment((char)0xFFFF)); } + [Fact] + public static void op_CheckedIncrementTest() + { + Assert.Equal((char)0x0001, IncrementOperatorsHelper.op_CheckedIncrement((char)0x0000)); + Assert.Equal((char)0x0002, IncrementOperatorsHelper.op_CheckedIncrement((char)0x0001)); + Assert.Equal((char)0x8000, IncrementOperatorsHelper.op_CheckedIncrement((char)0x7FFF)); + Assert.Equal((char)0x8001, IncrementOperatorsHelper.op_CheckedIncrement((char)0x8000)); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((char)0xFFFF)); + } + [Fact] public static void op_ModulusTest() { @@ -262,6 +309,8 @@ public static void op_ModulusTest() Assert.Equal((char)0x0001, ModulusOperatorsHelper.op_Modulus((char)0x7FFF, (char)2)); Assert.Equal((char)0x0000, ModulusOperatorsHelper.op_Modulus((char)0x8000, (char)2)); Assert.Equal((char)0x0001, ModulusOperatorsHelper.op_Modulus((char)0xFFFF, (char)2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((char)0x0001, (char)0)); } [Fact] @@ -274,6 +323,17 @@ public static void op_MultiplyTest() Assert.Equal((char)0xFFFE, MultiplyOperatorsHelper.op_Multiply((char)0xFFFF, (char)2)); } + [Fact] + public static void op_CheckedMultiplyTest() + { + Assert.Equal((char)0x0000, MultiplyOperatorsHelper.op_CheckedMultiply((char)0x0000, (char)2)); + Assert.Equal((char)0x0002, MultiplyOperatorsHelper.op_CheckedMultiply((char)0x0001, (char)2)); + Assert.Equal((char)0xFFFE, MultiplyOperatorsHelper.op_CheckedMultiply((char)0x7FFF, (char)2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((char)0x8000, (char)2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((char)0xFFFF, (char)2)); + } + [Fact] public static void AbsTest() { @@ -1002,7 +1062,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { Assert.Equal((char)0x0000, ShiftOperatorsHelper.op_LeftShift((char)0x0000, 1)); @@ -1032,6 +1091,17 @@ public static void op_SubtractionTest() Assert.Equal((char)0xFFFE, SubtractionOperatorsHelper.op_Subtraction((char)0xFFFF, (char)1)); } + [Fact] + public static void op_CheckedSubtractionTest() + { + Assert.Equal((char)0x0000, SubtractionOperatorsHelper.op_CheckedSubtraction((char)0x0001, (char)1)); + Assert.Equal((char)0x7FFE, SubtractionOperatorsHelper.op_CheckedSubtraction((char)0x7FFF, (char)1)); + Assert.Equal((char)0x7FFF, SubtractionOperatorsHelper.op_CheckedSubtraction((char)0x8000, (char)1)); + Assert.Equal((char)0xFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((char)0xFFFF, (char)1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction((char)0x0000, (char)1)); + } + [Fact] public static void op_UnaryNegationTest() { @@ -1042,6 +1112,17 @@ public static void op_UnaryNegationTest() Assert.Equal((char)0x0001, UnaryNegationOperatorsHelper.op_UnaryNegation((char)0xFFFF)); } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + Assert.Equal((char)0x0000, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((char)0x0000)); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((char)0x0001)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((char)0x7FFF)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((char)0x8000)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((char)0xFFFF)); + } + [Fact] public static void op_UnaryPlusTest() { diff --git a/src/libraries/System.Runtime/tests/System/GenericMathHelpers.cs b/src/libraries/System.Runtime/tests/System/GenericMathHelpers.cs index cbcfd60dc0723..e828884f66daa 100644 --- a/src/libraries/System.Runtime/tests/System/GenericMathHelpers.cs +++ b/src/libraries/System.Runtime/tests/System/GenericMathHelpers.cs @@ -3,7 +3,6 @@ using System.Globalization; using System.Numerics; -using System.Runtime.Versioning; namespace System.Tests { @@ -11,6 +10,8 @@ public static class AdditionOperatorsHelper where TSelf : IAdditionOperators { public static TResult op_Addition(TSelf left, TOther right) => left + right; + + public static TResult op_CheckedAddition(TSelf left, TOther right) => checked(left + right); } public static class AdditiveIdentityHelper @@ -71,12 +72,16 @@ public static class DecrementOperatorsHelper where TSelf : IDecrementOperators { public static TSelf op_Decrement(TSelf value) => --value; + + public static TSelf op_CheckedDecrement(TSelf value) => checked(--value); } public static class DivisionOperatorsHelper where TSelf : IDivisionOperators { public static TResult op_Division(TSelf left, TOther right) => left / right; + + public static TResult op_CheckedDivision(TSelf left, TOther right) => checked(left / right); } public static class EqualityOperatorsHelper @@ -91,6 +96,8 @@ public static class IncrementOperatorsHelper where TSelf : IIncrementOperators { public static TSelf op_Increment(TSelf value) => ++value; + + public static TSelf op_CheckedIncrement(TSelf value) => checked(++value); } public static class MinMaxValueHelper @@ -107,16 +114,18 @@ public static class ModulusOperatorsHelper public static TResult op_Modulus(TSelf left, TOther right) => left % right; } + public static class MultiplicativeIdentityHelper + where TSelf : IMultiplicativeIdentity + { + public static TResult MultiplicativeIdentity => TSelf.MultiplicativeIdentity; + } + public static class MultiplyOperatorsHelper where TSelf : IMultiplyOperators { public static TResult op_Multiply(TSelf left, TOther right) => left * right; - } - public static class MultiplicativeIdentityHelper - where TSelf : IMultiplicativeIdentity - { - public static TResult MultiplicativeIdentity => TSelf.MultiplicativeIdentity; + public static TResult op_CheckedMultiply(TSelf left, TOther right) => checked(left * right); } public static class NumberBaseHelper @@ -211,12 +220,16 @@ public static class SubtractionOperatorsHelper where TSelf : ISubtractionOperators { public static TResult op_Subtraction(TSelf left, TOther right) => left - right; + + public static TResult op_CheckedSubtraction(TSelf left, TOther right) => checked(left - right); } public static class UnaryNegationOperatorsHelper where TSelf : IUnaryNegationOperators { public static TResult op_UnaryNegation(TSelf value) => -value; + + public static TResult op_CheckedUnaryNegation(TSelf value) => checked(-value); } public static class UnaryPlusOperatorsHelper diff --git a/src/libraries/System.Runtime/tests/System/Int16Tests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/Int16Tests.GenericMath.cs index 3f63e60c439ad..559be16ee8107 100644 --- a/src/libraries/System.Runtime/tests/System/Int16Tests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/Int16Tests.GenericMath.cs @@ -61,6 +61,17 @@ public static void op_AdditionTest() Assert.Equal((short)0x0000, AdditionOperatorsHelper.op_Addition(unchecked((short)0xFFFF), (short)1)); } + [Fact] + public static void op_CheckedAdditionTest() + { + Assert.Equal((short)0x0001, AdditionOperatorsHelper.op_CheckedAddition((short)0x0000, (short)1)); + Assert.Equal((short)0x0002, AdditionOperatorsHelper.op_CheckedAddition((short)0x0001, (short)1)); + Assert.Equal(unchecked((short)0x8001), AdditionOperatorsHelper.op_CheckedAddition(unchecked((short)0x8000), (short)1)); + Assert.Equal((short)0x0000, AdditionOperatorsHelper.op_CheckedAddition(unchecked((short)0xFFFF), (short)1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((short)0x7FFF, (short)1)); + } + [Fact] public static void LeadingZeroCountTest() { @@ -221,6 +232,17 @@ public static void op_DecrementTest() Assert.Equal(unchecked((short)0xFFFE), DecrementOperatorsHelper.op_Decrement(unchecked((short)0xFFFF))); } + [Fact] + public static void op_CheckedDecrementTest() + { + Assert.Equal(unchecked((short)0xFFFF), DecrementOperatorsHelper.op_CheckedDecrement((short)0x0000)); + Assert.Equal((short)0x0000, DecrementOperatorsHelper.op_CheckedDecrement((short)0x0001)); + Assert.Equal((short)0x7FFE, DecrementOperatorsHelper.op_CheckedDecrement((short)0x7FFF)); + Assert.Equal(unchecked((short)0xFFFE), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((short)0xFFFF))); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement(unchecked((short)0x8000))); + } + [Fact] public static void op_DivisionTest() { @@ -229,6 +251,20 @@ public static void op_DivisionTest() Assert.Equal((short)0x3FFF, DivisionOperatorsHelper.op_Division((short)0x7FFF, (short)2)); Assert.Equal(unchecked((short)0xC000), DivisionOperatorsHelper.op_Division(unchecked((short)0x8000), (short)2)); Assert.Equal((short)0x0000, DivisionOperatorsHelper.op_Division(unchecked((short)0xFFFF), (short)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((short)0x0001, (short)0)); + } + + [Fact] + public static void op_CheckedDivisionTest() + { + Assert.Equal((short)0x0000, DivisionOperatorsHelper.op_CheckedDivision((short)0x0000, (short)2)); + Assert.Equal((short)0x0000, DivisionOperatorsHelper.op_CheckedDivision((short)0x0001, (short)2)); + Assert.Equal((short)0x3FFF, DivisionOperatorsHelper.op_CheckedDivision((short)0x7FFF, (short)2)); + Assert.Equal(unchecked((short)0xC000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((short)0x8000), (short)2)); + Assert.Equal((short)0x0000, DivisionOperatorsHelper.op_CheckedDivision(unchecked((short)0xFFFF), (short)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((short)0x0001, (short)0)); } [Fact] @@ -261,6 +297,17 @@ public static void op_IncrementTest() Assert.Equal((short)0x0000, IncrementOperatorsHelper.op_Increment(unchecked((short)0xFFFF))); } + [Fact] + public static void op_CheckedIncrementTest() + { + Assert.Equal((short)0x0001, IncrementOperatorsHelper.op_CheckedIncrement((short)0x0000)); + Assert.Equal((short)0x0002, IncrementOperatorsHelper.op_CheckedIncrement((short)0x0001)); + Assert.Equal(unchecked((short)0x8001), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((short)0x8000))); + Assert.Equal((short)0x0000, IncrementOperatorsHelper.op_CheckedIncrement(unchecked((short)0xFFFF))); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((short)0x7FFF)); + } + [Fact] public static void op_ModulusTest() { @@ -269,6 +316,8 @@ public static void op_ModulusTest() Assert.Equal((short)0x0001, ModulusOperatorsHelper.op_Modulus((short)0x7FFF, (short)2)); Assert.Equal((short)0x0000, ModulusOperatorsHelper.op_Modulus(unchecked((short)0x8000), (short)2)); Assert.Equal(unchecked((short)0xFFFF), ModulusOperatorsHelper.op_Modulus(unchecked((short)0xFFFF), (short)2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((short)0x0001, (short)0)); } [Fact] @@ -281,6 +330,17 @@ public static void op_MultiplyTest() Assert.Equal(unchecked((short)0xFFFE), MultiplyOperatorsHelper.op_Multiply(unchecked((short)0xFFFF), (short)2)); } + [Fact] + public static void op_CheckedMultiplyTest() + { + Assert.Equal((short)0x0000, MultiplyOperatorsHelper.op_CheckedMultiply((short)0x0000, (short)2)); + Assert.Equal((short)0x0002, MultiplyOperatorsHelper.op_CheckedMultiply((short)0x0001, (short)2)); + Assert.Equal(unchecked((short)0xFFFE), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((short)0xFFFF), (short)2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((short)0x7FFF, (short)2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((short)0x8000), (short)2)); + } + [Fact] public static void AbsTest() { @@ -1009,7 +1069,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { Assert.Equal((short)0x0000, ShiftOperatorsHelper.op_LeftShift((short)0x0000, 1)); @@ -1039,6 +1098,17 @@ public static void op_SubtractionTest() Assert.Equal(unchecked((short)0xFFFE), SubtractionOperatorsHelper.op_Subtraction(unchecked((short)0xFFFF), (short)1)); } + [Fact] + public static void op_CheckedSubtractionTest() + { + Assert.Equal(unchecked((short)0xFFFF), SubtractionOperatorsHelper.op_CheckedSubtraction((short)0x0000, (short)1)); + Assert.Equal((short)0x0000, SubtractionOperatorsHelper.op_CheckedSubtraction((short)0x0001, (short)1)); + Assert.Equal((short)0x7FFE, SubtractionOperatorsHelper.op_CheckedSubtraction((short)0x7FFF, (short)1)); + Assert.Equal(unchecked((short)0xFFFE), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((short)0xFFFF), (short)1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((short)0x8000), (short)1)); + } + [Fact] public static void op_UnaryNegationTest() { @@ -1049,6 +1119,17 @@ public static void op_UnaryNegationTest() Assert.Equal((short)0x0001, UnaryNegationOperatorsHelper.op_UnaryNegation(unchecked((short)0xFFFF))); } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + Assert.Equal((short)0x0000, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((short)0x0000)); + Assert.Equal(unchecked((short)0xFFFF), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((short)0x0001)); + Assert.Equal(unchecked((short)0x8001), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((short)0x7FFF)); + Assert.Equal((short)0x0001, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((short)0xFFFF))); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((short)0x8000))); + } + [Fact] public static void op_UnaryPlusTest() { diff --git a/src/libraries/System.Runtime/tests/System/Int32Tests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/Int32Tests.GenericMath.cs index 4e3302aa2e2d3..c03bf0313fc27 100644 --- a/src/libraries/System.Runtime/tests/System/Int32Tests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/Int32Tests.GenericMath.cs @@ -61,6 +61,17 @@ public static void op_AdditionTest() Assert.Equal((int)0x00000000, AdditionOperatorsHelper.op_Addition(unchecked((int)0xFFFFFFFF), 1)); } + [Fact] + public static void op_CheckedAdditionTest() + { + Assert.Equal((int)0x00000001, AdditionOperatorsHelper.op_CheckedAddition((int)0x00000000, 1)); + Assert.Equal((int)0x00000002, AdditionOperatorsHelper.op_CheckedAddition((int)0x00000001, 1)); + Assert.Equal(unchecked((int)0x80000001), AdditionOperatorsHelper.op_CheckedAddition(unchecked((int)0x80000000), 1)); + Assert.Equal((int)0x00000000, AdditionOperatorsHelper.op_CheckedAddition(unchecked((int)0xFFFFFFFF), 1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((int)0x7FFFFFFF, 1)); + } + [Fact] public static void LeadingZeroCountTest() { @@ -221,6 +232,17 @@ public static void op_DecrementTest() Assert.Equal(unchecked((int)0xFFFFFFFE), DecrementOperatorsHelper.op_Decrement(unchecked((int)0xFFFFFFFF))); } + [Fact] + public static void op_CheckedDecrementTest() + { + Assert.Equal(unchecked((int)0xFFFFFFFF), DecrementOperatorsHelper.op_CheckedDecrement((int)0x00000000)); + Assert.Equal((int)0x00000000, DecrementOperatorsHelper.op_CheckedDecrement((int)0x00000001)); + Assert.Equal((int)0x7FFFFFFE, DecrementOperatorsHelper.op_CheckedDecrement((int)0x7FFFFFFF)); + Assert.Equal(unchecked((int)0xFFFFFFFE), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((int)0xFFFFFFFF))); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement(unchecked((int)0x80000000))); + } + [Fact] public static void op_DivisionTest() { @@ -229,6 +251,20 @@ public static void op_DivisionTest() Assert.Equal((int)0x3FFFFFFF, DivisionOperatorsHelper.op_Division((int)0x7FFFFFFF, 2)); Assert.Equal(unchecked((int)0xC0000000), DivisionOperatorsHelper.op_Division(unchecked((int)0x80000000), 2)); Assert.Equal((int)0x00000000, DivisionOperatorsHelper.op_Division(unchecked((int)0xFFFFFFFF), 2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((int)0x00000001, 0)); + } + + [Fact] + public static void op_CheckedDivisionTest() + { + Assert.Equal((int)0x00000000, DivisionOperatorsHelper.op_CheckedDivision((int)0x00000000, 2)); + Assert.Equal((int)0x00000000, DivisionOperatorsHelper.op_CheckedDivision((int)0x00000001, 2)); + Assert.Equal((int)0x3FFFFFFF, DivisionOperatorsHelper.op_CheckedDivision((int)0x7FFFFFFF, 2)); + Assert.Equal(unchecked((int)0xC0000000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((int)0x80000000), 2)); + Assert.Equal((int)0x00000000, DivisionOperatorsHelper.op_CheckedDivision(unchecked((int)0xFFFFFFFF), 2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((int)0x00000001, 0)); } [Fact] @@ -261,6 +297,17 @@ public static void op_IncrementTest() Assert.Equal((int)0x00000000, IncrementOperatorsHelper.op_Increment(unchecked((int)0xFFFFFFFF))); } + [Fact] + public static void op_CheckedIncrementTest() + { + Assert.Equal((int)0x00000001, IncrementOperatorsHelper.op_CheckedIncrement((int)0x00000000)); + Assert.Equal((int)0x00000002, IncrementOperatorsHelper.op_CheckedIncrement((int)0x00000001)); + Assert.Equal(unchecked((int)0x80000001), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((int)0x80000000))); + Assert.Equal((int)0x00000000, IncrementOperatorsHelper.op_CheckedIncrement(unchecked((int)0xFFFFFFFF))); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((int)0x7FFFFFFF)); + } + [Fact] public static void op_ModulusTest() { @@ -269,6 +316,8 @@ public static void op_ModulusTest() Assert.Equal((int)0x00000001, ModulusOperatorsHelper.op_Modulus((int)0x7FFFFFFF, 2)); Assert.Equal((int)0x00000000, ModulusOperatorsHelper.op_Modulus(unchecked((int)0x80000000), 2)); Assert.Equal(unchecked((int)0xFFFFFFFF), ModulusOperatorsHelper.op_Modulus(unchecked((int)0xFFFFFFFF), 2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((int)0x00000001, 0)); } [Fact] @@ -281,6 +330,17 @@ public static void op_MultiplyTest() Assert.Equal(unchecked((int)0xFFFFFFFE), MultiplyOperatorsHelper.op_Multiply(unchecked((int)0xFFFFFFFF), 2)); } + [Fact] + public static void op_CheckedMultiplyTest() + { + Assert.Equal((int)0x00000000, MultiplyOperatorsHelper.op_CheckedMultiply((int)0x00000000, 2)); + Assert.Equal((int)0x00000002, MultiplyOperatorsHelper.op_CheckedMultiply((int)0x00000001, 2)); + Assert.Equal(unchecked((int)0xFFFFFFFE), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((int)0xFFFFFFFF), 2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((int)0x7FFFFFFF, 2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((int)0x80000000), 2)); + } + [Fact] public static void AbsTest() { @@ -1009,7 +1069,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { Assert.Equal((int)0x00000000, ShiftOperatorsHelper.op_LeftShift((int)0x00000000, 1)); @@ -1039,6 +1098,17 @@ public static void op_SubtractionTest() Assert.Equal(unchecked((int)0xFFFFFFFE), SubtractionOperatorsHelper.op_Subtraction(unchecked((int)0xFFFFFFFF), 1)); } + [Fact] + public static void op_CheckedSubtractionTest() + { + Assert.Equal(unchecked((int)0xFFFFFFFF), SubtractionOperatorsHelper.op_CheckedSubtraction((int)0x00000000, 1)); + Assert.Equal((int)0x00000000, SubtractionOperatorsHelper.op_CheckedSubtraction((int)0x00000001, 1)); + Assert.Equal((int)0x7FFFFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((int)0x7FFFFFFF, 1)); + Assert.Equal(unchecked((int)0xFFFFFFFE), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((int)0xFFFFFFFF), 1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((int)0x80000000), 1)); + } + [Fact] public static void op_UnaryNegationTest() { @@ -1049,6 +1119,17 @@ public static void op_UnaryNegationTest() Assert.Equal((int)0x00000001, UnaryNegationOperatorsHelper.op_UnaryNegation(unchecked((int)0xFFFFFFFF))); } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + Assert.Equal((int)0x00000000, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((int)0x00000000)); + Assert.Equal(unchecked((int)0xFFFFFFFF), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((int)0x00000001)); + Assert.Equal(unchecked((int)0x80000001), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((int)0x7FFFFFFF)); + Assert.Equal((int)0x00000001, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((int)0xFFFFFFFF))); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((int)0x80000000))); + } + [Fact] public static void op_UnaryPlusTest() { diff --git a/src/libraries/System.Runtime/tests/System/Int64Tests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/Int64Tests.GenericMath.cs index e3c6bcb0c7b68..126c6a2cd2095 100644 --- a/src/libraries/System.Runtime/tests/System/Int64Tests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/Int64Tests.GenericMath.cs @@ -61,6 +61,17 @@ public static void op_AdditionTest() Assert.Equal((long)0x0000000000000000, AdditionOperatorsHelper.op_Addition(unchecked((long)0xFFFFFFFFFFFFFFFF), 1)); } + [Fact] + public static void op_CheckedAdditionTest() + { + Assert.Equal((long)0x0000000000000001, AdditionOperatorsHelper.op_CheckedAddition((long)0x0000000000000000, 1)); + Assert.Equal((long)0x0000000000000002, AdditionOperatorsHelper.op_CheckedAddition((long)0x0000000000000001, 1)); + Assert.Equal(unchecked((long)0x8000000000000001), AdditionOperatorsHelper.op_CheckedAddition(unchecked((long)0x8000000000000000), 1)); + Assert.Equal((long)0x0000000000000000, AdditionOperatorsHelper.op_CheckedAddition(unchecked((long)0xFFFFFFFFFFFFFFFF), 1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((long)0x7FFFFFFFFFFFFFFF, 1)); + } + [Fact] public static void LeadingZeroCountTest() { @@ -221,6 +232,17 @@ public static void op_DecrementTest() Assert.Equal(unchecked((long)0xFFFFFFFFFFFFFFFE), DecrementOperatorsHelper.op_Decrement(unchecked((long)0xFFFFFFFFFFFFFFFF))); } + [Fact] + public static void op_CheckedDecrementTest() + { + Assert.Equal(unchecked((long)0xFFFFFFFFFFFFFFFF), DecrementOperatorsHelper.op_CheckedDecrement((long)0x0000000000000000)); + Assert.Equal((long)0x0000000000000000, DecrementOperatorsHelper.op_CheckedDecrement((long)0x0000000000000001)); + Assert.Equal((long)0x7FFFFFFFFFFFFFFE, DecrementOperatorsHelper.op_CheckedDecrement((long)0x7FFFFFFFFFFFFFFF)); + Assert.Equal(unchecked((long)0xFFFFFFFFFFFFFFFE), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((long)0xFFFFFFFFFFFFFFFF))); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement(unchecked((long)0x8000000000000000))); + } + [Fact] public static void op_DivisionTest() { @@ -229,6 +251,20 @@ public static void op_DivisionTest() Assert.Equal((long)0x3FFFFFFFFFFFFFFF, DivisionOperatorsHelper.op_Division((long)0x7FFFFFFFFFFFFFFF, 2)); Assert.Equal(unchecked((long)0xC000000000000000), DivisionOperatorsHelper.op_Division(unchecked((long)0x8000000000000000), 2)); Assert.Equal((long)0x0000000000000000, DivisionOperatorsHelper.op_Division(unchecked((long)0xFFFFFFFFFFFFFFFF), 2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((long)0x0000000000000001, 0)); + } + + [Fact] + public static void op_CheckedDivisionTest() + { + Assert.Equal((long)0x0000000000000000, DivisionOperatorsHelper.op_CheckedDivision((long)0x0000000000000000, 2)); + Assert.Equal((long)0x0000000000000000, DivisionOperatorsHelper.op_CheckedDivision((long)0x0000000000000001, 2)); + Assert.Equal((long)0x3FFFFFFFFFFFFFFF, DivisionOperatorsHelper.op_CheckedDivision((long)0x7FFFFFFFFFFFFFFF, 2)); + Assert.Equal(unchecked((long)0xC000000000000000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((long)0x8000000000000000), 2)); + Assert.Equal((long)0x0000000000000000, DivisionOperatorsHelper.op_CheckedDivision(unchecked((long)0xFFFFFFFFFFFFFFFF), 2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((long)0x0000000000000001, 0)); } [Fact] @@ -261,6 +297,17 @@ public static void op_IncrementTest() Assert.Equal((long)0x0000000000000000, IncrementOperatorsHelper.op_Increment(unchecked((long)0xFFFFFFFFFFFFFFFF))); } + [Fact] + public static void op_CheckedIncrementTest() + { + Assert.Equal((long)0x0000000000000001, IncrementOperatorsHelper.op_CheckedIncrement((long)0x0000000000000000)); + Assert.Equal((long)0x0000000000000002, IncrementOperatorsHelper.op_CheckedIncrement((long)0x0000000000000001)); + Assert.Equal(unchecked((long)0x8000000000000001), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((long)0x8000000000000000))); + Assert.Equal((long)0x0000000000000000, IncrementOperatorsHelper.op_CheckedIncrement(unchecked((long)0xFFFFFFFFFFFFFFFF))); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((long)0x7FFFFFFFFFFFFFFF)); + } + [Fact] public static void op_ModulusTest() { @@ -269,6 +316,8 @@ public static void op_ModulusTest() Assert.Equal((long)0x0000000000000001, ModulusOperatorsHelper.op_Modulus((long)0x7FFFFFFFFFFFFFFF, 2)); Assert.Equal((long)0x0000000000000000, ModulusOperatorsHelper.op_Modulus(unchecked((long)0x8000000000000000), 2)); Assert.Equal(unchecked((long)0xFFFFFFFFFFFFFFFF), ModulusOperatorsHelper.op_Modulus(unchecked((long)0xFFFFFFFFFFFFFFFF), 2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((long)0x0000000000000001, 0)); } [Fact] @@ -281,6 +330,17 @@ public static void op_MultiplyTest() Assert.Equal(unchecked((long)0xFFFFFFFFFFFFFFFE), MultiplyOperatorsHelper.op_Multiply(unchecked((long)0xFFFFFFFFFFFFFFFF), 2)); } + [Fact] + public static void op_CheckedMultiplyTest() + { + Assert.Equal((long)0x0000000000000000, MultiplyOperatorsHelper.op_CheckedMultiply((long)0x0000000000000000, 2)); + Assert.Equal((long)0x0000000000000002, MultiplyOperatorsHelper.op_CheckedMultiply((long)0x0000000000000001, 2)); + Assert.Equal(unchecked((long)0xFFFFFFFFFFFFFFFE), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((long)0xFFFFFFFFFFFFFFFF), 2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((long)0x7FFFFFFFFFFFFFFF, 2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((long)0x8000000000000000), 2)); + } + [Fact] public static void AbsTest() { @@ -1009,7 +1069,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { Assert.Equal((long)0x0000000000000000, ShiftOperatorsHelper.op_LeftShift((long)0x0000000000000000, 1)); @@ -1039,6 +1098,17 @@ public static void op_SubtractionTest() Assert.Equal(unchecked((long)0xFFFFFFFFFFFFFFFE), SubtractionOperatorsHelper.op_Subtraction(unchecked((long)0xFFFFFFFFFFFFFFFF), 1)); } + [Fact] + public static void op_CheckedSubtractionTest() + { + Assert.Equal(unchecked((long)0xFFFFFFFFFFFFFFFF), SubtractionOperatorsHelper.op_CheckedSubtraction((long)0x0000000000000000, 1)); + Assert.Equal((long)0x0000000000000000, SubtractionOperatorsHelper.op_CheckedSubtraction((long)0x0000000000000001, 1)); + Assert.Equal((long)0x7FFFFFFFFFFFFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((long)0x7FFFFFFFFFFFFFFF, 1)); + Assert.Equal(unchecked((long)0xFFFFFFFFFFFFFFFE), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((long)0xFFFFFFFFFFFFFFFF), 1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((long)0x8000000000000000), 1)); + } + [Fact] public static void op_UnaryNegationTest() { @@ -1049,6 +1119,17 @@ public static void op_UnaryNegationTest() Assert.Equal((long)0x0000000000000001, UnaryNegationOperatorsHelper.op_UnaryNegation(unchecked((long)0xFFFFFFFFFFFFFFFF))); } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + Assert.Equal((long)0x0000000000000000, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((long)0x0000000000000000)); + Assert.Equal(unchecked((long)0xFFFFFFFFFFFFFFFF), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((long)0x0000000000000001)); + Assert.Equal(unchecked((long)0x8000000000000001), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((long)0x7FFFFFFFFFFFFFFF)); + Assert.Equal((long)0x0000000000000001, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((long)0xFFFFFFFFFFFFFFFF))); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((long)0x8000000000000000))); + } + [Fact] public static void op_UnaryPlusTest() { diff --git a/src/libraries/System.Runtime/tests/System/IntPtrTests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/IntPtrTests.GenericMath.cs index 2d0bd7bd7bf43..27b3600424744 100644 --- a/src/libraries/System.Runtime/tests/System/IntPtrTests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/IntPtrTests.GenericMath.cs @@ -93,6 +93,29 @@ public static void op_AdditionTest() } } + [Fact] + public static void op_CheckedAdditionTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nint)0x0000000000000001), AdditionOperatorsHelper.op_CheckedAddition(unchecked((nint)0x0000000000000000), (nint)1)); + Assert.Equal(unchecked((nint)0x0000000000000002), AdditionOperatorsHelper.op_CheckedAddition(unchecked((nint)0x0000000000000001), (nint)1)); + Assert.Equal(unchecked((nint)0x8000000000000001), AdditionOperatorsHelper.op_CheckedAddition(unchecked((nint)0x8000000000000000), (nint)1)); + Assert.Equal(unchecked((nint)0x0000000000000000), AdditionOperatorsHelper.op_CheckedAddition(unchecked((nint)0xFFFFFFFFFFFFFFFF), (nint)1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition(unchecked((nint)0x7FFFFFFFFFFFFFFF), (nint)1)); + } + else + { + Assert.Equal((nint)0x00000001, AdditionOperatorsHelper.op_CheckedAddition((nint)0x00000000, (nint)1)); + Assert.Equal((nint)0x00000002, AdditionOperatorsHelper.op_CheckedAddition((nint)0x00000001, (nint)1)); + Assert.Equal(unchecked((nint)0x80000001), AdditionOperatorsHelper.op_CheckedAddition(unchecked((nint)0x80000000), (nint)1)); + Assert.Equal((nint)0x00000000, AdditionOperatorsHelper.op_CheckedAddition(unchecked((nint)0xFFFFFFFF), (nint)1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((nint)0x7FFFFFFF, (nint)1)); + } + } + [Fact] public static void LeadingZeroCountTest() { @@ -429,6 +452,29 @@ public static void op_DecrementTest() } } + [Fact] + public static void op_CheckedDecrementTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nint)0xFFFFFFFFFFFFFFFF), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nint)0x0000000000000000))); + Assert.Equal(unchecked((nint)0x0000000000000000), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nint)0x0000000000000001))); + Assert.Equal(unchecked((nint)0x7FFFFFFFFFFFFFFE), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nint)0x7FFFFFFFFFFFFFFF))); + Assert.Equal(unchecked((nint)0xFFFFFFFFFFFFFFFE), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nint)0xFFFFFFFFFFFFFFFF))); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nint)0x8000000000000000))); + } + else + { + Assert.Equal(unchecked((nint)0xFFFFFFFF), DecrementOperatorsHelper.op_CheckedDecrement((nint)0x00000000)); + Assert.Equal((nint)0x00000000, DecrementOperatorsHelper.op_CheckedDecrement((nint)0x00000001)); + Assert.Equal((nint)0x7FFFFFFE, DecrementOperatorsHelper.op_CheckedDecrement((nint)0x7FFFFFFF)); + Assert.Equal(unchecked((nint)0xFFFFFFFE), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nint)0xFFFFFFFF))); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nint)0x80000000))); + } + } + [Fact] public static void op_DivisionTest() { @@ -439,6 +485,8 @@ public static void op_DivisionTest() Assert.Equal(unchecked((nint)0x3FFFFFFFFFFFFFFF), DivisionOperatorsHelper.op_Division(unchecked((nint)0x7FFFFFFFFFFFFFFF), (nint)2)); Assert.Equal(unchecked((nint)0xC000000000000000), DivisionOperatorsHelper.op_Division(unchecked((nint)0x8000000000000000), (nint)2)); Assert.Equal(unchecked((nint)0x0000000000000000), DivisionOperatorsHelper.op_Division(unchecked((nint)0xFFFFFFFFFFFFFFFF), (nint)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division(unchecked((nint)0x0000000000000001), (nint)0)); } else { @@ -447,6 +495,33 @@ public static void op_DivisionTest() Assert.Equal((nint)0x3FFFFFFF, DivisionOperatorsHelper.op_Division((nint)0x7FFFFFFF, (nint)2)); Assert.Equal(unchecked((nint)0xC0000000), DivisionOperatorsHelper.op_Division(unchecked((nint)0x80000000), (nint)2)); Assert.Equal((nint)0x00000000, DivisionOperatorsHelper.op_Division(unchecked((nint)0xFFFFFFFF), (nint)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((nint)0x00000001, (nint)0)); + } + } + + [Fact] + public static void op_CheckedDivisionTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nint)0x0000000000000000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nint)0x0000000000000000), (nint)2)); + Assert.Equal(unchecked((nint)0x0000000000000000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nint)0x0000000000000001), (nint)2)); + Assert.Equal(unchecked((nint)0x3FFFFFFFFFFFFFFF), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nint)0x7FFFFFFFFFFFFFFF), (nint)2)); + Assert.Equal(unchecked((nint)0xC000000000000000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nint)0x8000000000000000), (nint)2)); + Assert.Equal(unchecked((nint)0x0000000000000000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nint)0xFFFFFFFFFFFFFFFF), (nint)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision(unchecked((nint)0x0000000000000001), (nint)0)); + } + else + { + Assert.Equal((nint)0x00000000, DivisionOperatorsHelper.op_CheckedDivision((nint)0x00000000, (nint)2)); + Assert.Equal((nint)0x00000000, DivisionOperatorsHelper.op_CheckedDivision((nint)0x00000001, (nint)2)); + Assert.Equal((nint)0x3FFFFFFF, DivisionOperatorsHelper.op_CheckedDivision((nint)0x7FFFFFFF, (nint)2)); + Assert.Equal(unchecked((nint)0xC0000000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nint)0x80000000), (nint)2)); + Assert.Equal((nint)0x00000000, DivisionOperatorsHelper.op_CheckedDivision(unchecked((nint)0xFFFFFFFF), (nint)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((nint)0x00000001, (nint)0)); } } @@ -513,6 +588,30 @@ public static void op_IncrementTest() } } + [Fact] + public static void op_CheckedIncrementTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nint)0x0000000000000001), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nint)0x0000000000000000))); + Assert.Equal(unchecked((nint)0x0000000000000002), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nint)0x0000000000000001))); + Assert.Equal(unchecked((nint)0x8000000000000001), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nint)0x8000000000000000))); + Assert.Equal(unchecked((nint)0x0000000000000000), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nint)0xFFFFFFFFFFFFFFFF))); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nint)0x7FFFFFFFFFFFFFFF))); + + } + else + { + Assert.Equal((nint)0x00000001, IncrementOperatorsHelper.op_CheckedIncrement((nint)0x00000000)); + Assert.Equal((nint)0x00000002, IncrementOperatorsHelper.op_CheckedIncrement((nint)0x00000001)); + Assert.Equal(unchecked((nint)0x80000001), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nint)0x80000000))); + Assert.Equal((nint)0x00000000, IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nint)0xFFFFFFFF))); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((nint)0x7FFFFFFF)); + } + } + [Fact] public static void op_ModulusTest() { @@ -523,6 +622,8 @@ public static void op_ModulusTest() Assert.Equal(unchecked((nint)0x0000000000000001), ModulusOperatorsHelper.op_Modulus(unchecked((nint)0x7FFFFFFFFFFFFFFF), (nint)2)); Assert.Equal(unchecked((nint)0x0000000000000000), ModulusOperatorsHelper.op_Modulus(unchecked((nint)0x8000000000000000), (nint)2)); Assert.Equal(unchecked((nint)0xFFFFFFFFFFFFFFFF), ModulusOperatorsHelper.op_Modulus(unchecked((nint)0xFFFFFFFFFFFFFFFF), (nint)2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus(unchecked((nint)0x0000000000000001), (nint)0)); } else { @@ -531,6 +632,8 @@ public static void op_ModulusTest() Assert.Equal((nint)0x00000001, ModulusOperatorsHelper.op_Modulus((nint)0x7FFFFFFF, (nint)2)); Assert.Equal((nint)0x00000000, ModulusOperatorsHelper.op_Modulus(unchecked((nint)0x80000000), (nint)2)); Assert.Equal(unchecked((nint)0xFFFFFFFF), ModulusOperatorsHelper.op_Modulus(unchecked((nint)0xFFFFFFFF), (nint)2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((nint)0x00000001, (nint)0)); } } @@ -555,6 +658,29 @@ public static void op_MultiplyTest() } } + [Fact] + public static void op_CheckedMultiplyTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nint)0x0000000000000000), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nint)0x0000000000000000), (nint)2)); + Assert.Equal(unchecked((nint)0x0000000000000002), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nint)0x0000000000000001), (nint)2)); + Assert.Equal(unchecked((nint)0xFFFFFFFFFFFFFFFE), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nint)0xFFFFFFFFFFFFFFFF), (nint)2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nint)0x7FFFFFFFFFFFFFFF), (nint)2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nint)0x8000000000000000), (nint)2)); + } + else + { + Assert.Equal((nint)0x00000000, MultiplyOperatorsHelper.op_CheckedMultiply((nint)0x00000000, (nint)2)); + Assert.Equal((nint)0x00000002, MultiplyOperatorsHelper.op_CheckedMultiply((nint)0x00000001, (nint)2)); + Assert.Equal(unchecked((nint)0xFFFFFFFE), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nint)0xFFFFFFFF), (nint)2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((nint)0x7FFFFFFF, (nint)2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nint)0x80000000), (nint)2)); + } + } + [Fact] public static void AbsTest() { @@ -1519,7 +1645,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { if (Environment.Is64BitProcess) @@ -1582,6 +1707,29 @@ public static void op_SubtractionTest() } } + [Fact] + public static void op_CheckedSubtractionTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nint)0xFFFFFFFFFFFFFFFF), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nint)0x0000000000000000), (nint)1)); + Assert.Equal(unchecked((nint)0x0000000000000000), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nint)0x0000000000000001), (nint)1)); + Assert.Equal(unchecked((nint)0x7FFFFFFFFFFFFFFE), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nint)0x7FFFFFFFFFFFFFFF), (nint)1)); + Assert.Equal(unchecked((nint)0xFFFFFFFFFFFFFFFE), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nint)0xFFFFFFFFFFFFFFFF), (nint)1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nint)0x8000000000000000), (nint)1)); + } + else + { + Assert.Equal(unchecked((nint)0xFFFFFFFF), SubtractionOperatorsHelper.op_CheckedSubtraction((nint)0x00000000, (nint)1)); + Assert.Equal((nint)0x00000000, SubtractionOperatorsHelper.op_CheckedSubtraction((nint)0x00000001, (nint)1)); + Assert.Equal((nint)0x7FFFFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((nint)0x7FFFFFFF, (nint)1)); + Assert.Equal(unchecked((nint)0xFFFFFFFE), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nint)0xFFFFFFFF), (nint)1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nint)0x80000000), (nint)1)); + } + } + [Fact] public static void op_UnaryNegationTest() { @@ -1603,6 +1751,29 @@ public static void op_UnaryNegationTest() } } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nint)0x0000000000000000), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nint)0x0000000000000000))); + Assert.Equal(unchecked((nint)0xFFFFFFFFFFFFFFFF), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nint)0x0000000000000001))); + Assert.Equal(unchecked((nint)0x8000000000000001), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nint)0x7FFFFFFFFFFFFFFF))); + Assert.Equal(unchecked((nint)0x0000000000000001), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nint)0xFFFFFFFFFFFFFFFF))); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nint)0x8000000000000000))); + } + else + { + Assert.Equal((nint)0x00000000, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((nint)0x00000000)); + Assert.Equal(unchecked((nint)0xFFFFFFFF), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((nint)0x00000001)); + Assert.Equal(unchecked((nint)0x80000001), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((nint)0x7FFFFFFF)); + Assert.Equal((nint)0x00000001, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nint)0xFFFFFFFF))); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nint)0x80000000))); + } + } + [Fact] public static void op_UnaryPlusTest() { diff --git a/src/libraries/System.Runtime/tests/System/SByteTests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/SByteTests.GenericMath.cs index 658446a9e15b0..c3116657957e2 100644 --- a/src/libraries/System.Runtime/tests/System/SByteTests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/SByteTests.GenericMath.cs @@ -61,6 +61,17 @@ public static void op_AdditionTest() Assert.Equal((sbyte)0x00, AdditionOperatorsHelper.op_Addition(unchecked((sbyte)0xFF), (sbyte)1)); } + [Fact] + public static void op_CheckedAdditionTest() + { + Assert.Equal((sbyte)0x01, AdditionOperatorsHelper.op_CheckedAddition((sbyte)0x00, (sbyte)1)); + Assert.Equal((sbyte)0x02, AdditionOperatorsHelper.op_CheckedAddition((sbyte)0x01, (sbyte)1)); + Assert.Equal(unchecked((sbyte)0x81), AdditionOperatorsHelper.op_CheckedAddition(unchecked((sbyte)0x80), (sbyte)1)); + Assert.Equal((sbyte)0x00, AdditionOperatorsHelper.op_CheckedAddition(unchecked((sbyte)0xFF), (sbyte)1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((sbyte)0x7F, (sbyte)1)); + } + [Fact] public static void LeadingZeroCountTest() { @@ -221,6 +232,17 @@ public static void op_DecrementTest() Assert.Equal(unchecked((sbyte)0xFE), DecrementOperatorsHelper.op_Decrement(unchecked((sbyte)0xFF))); } + [Fact] + public static void op_CheckedDecrementTest() + { + Assert.Equal(unchecked((sbyte)0xFF), DecrementOperatorsHelper.op_CheckedDecrement((sbyte)0x00)); + Assert.Equal((sbyte)0x00, DecrementOperatorsHelper.op_CheckedDecrement((sbyte)0x01)); + Assert.Equal((sbyte)0x7E, DecrementOperatorsHelper.op_CheckedDecrement((sbyte)0x7F)); + Assert.Equal(unchecked((sbyte)0xFE), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((sbyte)0xFF))); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement(unchecked((sbyte)0x80))); + } + [Fact] public static void op_DivisionTest() { @@ -229,6 +251,20 @@ public static void op_DivisionTest() Assert.Equal((sbyte)0x3F, DivisionOperatorsHelper.op_Division((sbyte)0x7F, (sbyte)2)); Assert.Equal(unchecked((sbyte)0xC0), DivisionOperatorsHelper.op_Division(unchecked((sbyte)0x80), (sbyte)2)); Assert.Equal((sbyte)0x00, DivisionOperatorsHelper.op_Division(unchecked((sbyte)0xFF), (sbyte)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((sbyte)0x01, (sbyte)0)); + } + + [Fact] + public static void op_CheckedDivisionTest() + { + Assert.Equal((sbyte)0x00, DivisionOperatorsHelper.op_CheckedDivision((sbyte)0x00, (sbyte)2)); + Assert.Equal((sbyte)0x00, DivisionOperatorsHelper.op_CheckedDivision((sbyte)0x01, (sbyte)2)); + Assert.Equal((sbyte)0x3F, DivisionOperatorsHelper.op_CheckedDivision((sbyte)0x7F, (sbyte)2)); + Assert.Equal(unchecked((sbyte)0xC0), DivisionOperatorsHelper.op_CheckedDivision(unchecked((sbyte)0x80), (sbyte)2)); + Assert.Equal((sbyte)0x00, DivisionOperatorsHelper.op_CheckedDivision(unchecked((sbyte)0xFF), (sbyte)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((sbyte)0x01, (sbyte)0)); } [Fact] @@ -261,6 +297,17 @@ public static void op_IncrementTest() Assert.Equal((sbyte)0x00, IncrementOperatorsHelper.op_Increment(unchecked((sbyte)0xFF))); } + [Fact] + public static void op_CheckedIncrementTest() + { + Assert.Equal((sbyte)0x01, IncrementOperatorsHelper.op_CheckedIncrement((sbyte)0x00)); + Assert.Equal((sbyte)0x02, IncrementOperatorsHelper.op_CheckedIncrement((sbyte)0x01)); + Assert.Equal(unchecked((sbyte)0x81), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((sbyte)0x80))); + Assert.Equal((sbyte)0x00, IncrementOperatorsHelper.op_CheckedIncrement(unchecked((sbyte)0xFF))); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((sbyte)0x7F)); + } + [Fact] public static void op_ModulusTest() { @@ -269,6 +316,8 @@ public static void op_ModulusTest() Assert.Equal((sbyte)0x01, ModulusOperatorsHelper.op_Modulus((sbyte)0x7F, (sbyte)2)); Assert.Equal((sbyte)0x00, ModulusOperatorsHelper.op_Modulus(unchecked((sbyte)0x80), (sbyte)2)); Assert.Equal(unchecked((sbyte)0xFF), ModulusOperatorsHelper.op_Modulus(unchecked((sbyte)0xFF), (sbyte)2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((sbyte)0x01, (sbyte)0)); } [Fact] @@ -281,6 +330,17 @@ public static void op_MultiplyTest() Assert.Equal(unchecked((sbyte)0xFE), MultiplyOperatorsHelper.op_Multiply(unchecked((sbyte)0xFF), (sbyte)2)); } + [Fact] + public static void op_CheckedMultiplyTest() + { + Assert.Equal((sbyte)0x00, MultiplyOperatorsHelper.op_CheckedMultiply((sbyte)0x00, (sbyte)2)); + Assert.Equal((sbyte)0x02, MultiplyOperatorsHelper.op_CheckedMultiply((sbyte)0x01, (sbyte)2)); + Assert.Equal(unchecked((sbyte)0xFE), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((sbyte)0xFF), (sbyte)2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((sbyte)0x7F, (sbyte)2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((sbyte)0x80), (sbyte)2)); + } + [Fact] public static void AbsTest() { @@ -1009,7 +1069,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { Assert.Equal((sbyte)0x00, ShiftOperatorsHelper.op_LeftShift((sbyte)0x00, 1)); @@ -1039,6 +1098,17 @@ public static void op_SubtractionTest() Assert.Equal(unchecked((sbyte)0xFE), SubtractionOperatorsHelper.op_Subtraction(unchecked((sbyte)0xFF), (sbyte)1)); } + [Fact] + public static void op_CheckedSubtractionTest() + { + Assert.Equal(unchecked((sbyte)0xFF), SubtractionOperatorsHelper.op_CheckedSubtraction((sbyte)0x00, (sbyte)1)); + Assert.Equal((sbyte)0x00, SubtractionOperatorsHelper.op_CheckedSubtraction((sbyte)0x01, (sbyte)1)); + Assert.Equal((sbyte)0x7E, SubtractionOperatorsHelper.op_CheckedSubtraction((sbyte)0x7F, (sbyte)1)); + Assert.Equal(unchecked((sbyte)0xFE), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((sbyte)0xFF), (sbyte)1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((sbyte)0x80), (sbyte)1)); + } + [Fact] public static void op_UnaryNegationTest() { @@ -1049,6 +1119,17 @@ public static void op_UnaryNegationTest() Assert.Equal((sbyte)0x01, UnaryNegationOperatorsHelper.op_UnaryNegation(unchecked((sbyte)0xFF))); } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + Assert.Equal((sbyte)0x00, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((sbyte)0x00)); + Assert.Equal(unchecked((sbyte)0xFF), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((sbyte)0x01)); + Assert.Equal(unchecked((sbyte)0x81), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((sbyte)0x7F)); + Assert.Equal((sbyte)0x01, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((sbyte)0xFF))); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((sbyte)0x80))); + } + [Fact] public static void op_UnaryPlusTest() { diff --git a/src/libraries/System.Runtime/tests/System/UInt16Tests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/UInt16Tests.GenericMath.cs index e9e187d2faa03..35cdc53d34b17 100644 --- a/src/libraries/System.Runtime/tests/System/UInt16Tests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/UInt16Tests.GenericMath.cs @@ -55,6 +55,17 @@ public static void op_AdditionTest() Assert.Equal((ushort)0x0000, AdditionOperatorsHelper.op_Addition((ushort)0xFFFF, (ushort)1)); } + [Fact] + public static void op_CheckedAdditionTest() + { + Assert.Equal((ushort)0x0001, AdditionOperatorsHelper.op_CheckedAddition((ushort)0x0000, (ushort)1)); + Assert.Equal((ushort)0x0002, AdditionOperatorsHelper.op_CheckedAddition((ushort)0x0001, (ushort)1)); + Assert.Equal((ushort)0x8000, AdditionOperatorsHelper.op_CheckedAddition((ushort)0x7FFF, (ushort)1)); + Assert.Equal((ushort)0x8001, AdditionOperatorsHelper.op_CheckedAddition((ushort)0x8000, (ushort)1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((ushort)0xFFFF, (ushort)1)); + } + [Fact] public static void LeadingZeroCountTest() { @@ -215,6 +226,17 @@ public static void op_DecrementTest() Assert.Equal((ushort)0xFFFE, DecrementOperatorsHelper.op_Decrement((ushort)0xFFFF)); } + [Fact] + public static void op_CheckedDecrementTest() + { + Assert.Equal((ushort)0x0000, DecrementOperatorsHelper.op_CheckedDecrement((ushort)0x0001)); + Assert.Equal((ushort)0x7FFE, DecrementOperatorsHelper.op_CheckedDecrement((ushort)0x7FFF)); + Assert.Equal((ushort)0x7FFF, DecrementOperatorsHelper.op_CheckedDecrement((ushort)0x8000)); + Assert.Equal((ushort)0xFFFE, DecrementOperatorsHelper.op_CheckedDecrement((ushort)0xFFFF)); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement((ushort)0x0000)); + } + [Fact] public static void op_DivisionTest() { @@ -223,6 +245,20 @@ public static void op_DivisionTest() Assert.Equal((ushort)0x3FFF, DivisionOperatorsHelper.op_Division((ushort)0x7FFF, (ushort)2)); Assert.Equal((ushort)0x4000, DivisionOperatorsHelper.op_Division((ushort)0x8000, (ushort)2)); Assert.Equal((ushort)0x7FFF, DivisionOperatorsHelper.op_Division((ushort)0xFFFF, (ushort)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((ushort)0x0001, (ushort)0)); + } + + [Fact] + public static void op_CheckedDivisionTest() + { + Assert.Equal((ushort)0x0000, DivisionOperatorsHelper.op_CheckedDivision((ushort)0x0000, (ushort)2)); + Assert.Equal((ushort)0x0000, DivisionOperatorsHelper.op_CheckedDivision((ushort)0x0001, (ushort)2)); + Assert.Equal((ushort)0x3FFF, DivisionOperatorsHelper.op_CheckedDivision((ushort)0x7FFF, (ushort)2)); + Assert.Equal((ushort)0x4000, DivisionOperatorsHelper.op_CheckedDivision((ushort)0x8000, (ushort)2)); + Assert.Equal((ushort)0x7FFF, DivisionOperatorsHelper.op_CheckedDivision((ushort)0xFFFF, (ushort)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((ushort)0x0001, (ushort)0)); } [Fact] @@ -255,6 +291,17 @@ public static void op_IncrementTest() Assert.Equal((ushort)0x0000, IncrementOperatorsHelper.op_Increment((ushort)0xFFFF)); } + [Fact] + public static void op_CheckedIncrementTest() + { + Assert.Equal((ushort)0x0001, IncrementOperatorsHelper.op_CheckedIncrement((ushort)0x0000)); + Assert.Equal((ushort)0x0002, IncrementOperatorsHelper.op_CheckedIncrement((ushort)0x0001)); + Assert.Equal((ushort)0x8000, IncrementOperatorsHelper.op_CheckedIncrement((ushort)0x7FFF)); + Assert.Equal((ushort)0x8001, IncrementOperatorsHelper.op_CheckedIncrement((ushort)0x8000)); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((ushort)0xFFFF)); + } + [Fact] public static void op_ModulusTest() { @@ -263,6 +310,8 @@ public static void op_ModulusTest() Assert.Equal((ushort)0x0001, ModulusOperatorsHelper.op_Modulus((ushort)0x7FFF, (ushort)2)); Assert.Equal((ushort)0x0000, ModulusOperatorsHelper.op_Modulus((ushort)0x8000, (ushort)2)); Assert.Equal((ushort)0x0001, ModulusOperatorsHelper.op_Modulus((ushort)0xFFFF, (ushort)2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((ushort)0x0001, (ushort)0)); } [Fact] @@ -275,6 +324,17 @@ public static void op_MultiplyTest() Assert.Equal((ushort)0xFFFE, MultiplyOperatorsHelper.op_Multiply((ushort)0xFFFF, (ushort)2)); } + [Fact] + public static void op_CheckedMultiplyTest() + { + Assert.Equal((ushort)0x0000, MultiplyOperatorsHelper.op_CheckedMultiply((ushort)0x0000, (ushort)2)); + Assert.Equal((ushort)0x0002, MultiplyOperatorsHelper.op_CheckedMultiply((ushort)0x0001, (ushort)2)); + Assert.Equal((ushort)0xFFFE, MultiplyOperatorsHelper.op_CheckedMultiply((ushort)0x7FFF, (ushort)2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((ushort)0x8000, (ushort)2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((ushort)0xFFFF, (ushort)2)); + } + [Fact] public static void AbsTest() { @@ -1003,7 +1063,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { Assert.Equal((ushort)0x0000, ShiftOperatorsHelper.op_LeftShift((ushort)0x0000, 1)); @@ -1033,6 +1092,17 @@ public static void op_SubtractionTest() Assert.Equal((ushort)0xFFFE, SubtractionOperatorsHelper.op_Subtraction((ushort)0xFFFF, (ushort)1)); } + [Fact] + public static void op_CheckedSubtractionTest() + { + Assert.Equal((ushort)0x0000, SubtractionOperatorsHelper.op_CheckedSubtraction((ushort)0x0001, (ushort)1)); + Assert.Equal((ushort)0x7FFE, SubtractionOperatorsHelper.op_CheckedSubtraction((ushort)0x7FFF, (ushort)1)); + Assert.Equal((ushort)0x7FFF, SubtractionOperatorsHelper.op_CheckedSubtraction((ushort)0x8000, (ushort)1)); + Assert.Equal((ushort)0xFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((ushort)0xFFFF, (ushort)1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction((ushort)0x0000, (ushort)1)); + } + [Fact] public static void op_UnaryNegationTest() { @@ -1043,6 +1113,17 @@ public static void op_UnaryNegationTest() Assert.Equal((ushort)0x0001, UnaryNegationOperatorsHelper.op_UnaryNegation((ushort)0xFFFF)); } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + Assert.Equal((ushort)0x0000, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((ushort)0x0000)); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((ushort)0x0001)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((ushort)0x7FFF)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((ushort)0x8000)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((ushort)0xFFFF)); + } + [Fact] public static void op_UnaryPlusTest() { diff --git a/src/libraries/System.Runtime/tests/System/UInt32Tests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/UInt32Tests.GenericMath.cs index b79481aa3e8f1..da6786ab1c85e 100644 --- a/src/libraries/System.Runtime/tests/System/UInt32Tests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/UInt32Tests.GenericMath.cs @@ -55,6 +55,18 @@ public static void op_AdditionTest() Assert.Equal((uint)0x00000000, AdditionOperatorsHelper.op_Addition((uint)0xFFFFFFFF, 1)); } + [Fact] + public static void op_CheckedAdditionTest() + { + Assert.Equal((uint)0x00000001, AdditionOperatorsHelper.op_CheckedAddition((uint)0x00000000, 1)); + Assert.Equal((uint)0x00000002, AdditionOperatorsHelper.op_CheckedAddition((uint)0x00000001, 1)); + Assert.Equal((uint)0x80000000, AdditionOperatorsHelper.op_CheckedAddition((uint)0x7FFFFFFF, 1)); + Assert.Equal((uint)0x80000001, AdditionOperatorsHelper.op_CheckedAddition((uint)0x80000000, 1)); + + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((uint)0xFFFFFFFF, 1)); + } + [Fact] public static void LeadingZeroCountTest() { @@ -215,6 +227,17 @@ public static void op_DecrementTest() Assert.Equal((uint)0xFFFFFFFE, DecrementOperatorsHelper.op_Decrement((uint)0xFFFFFFFF)); } + [Fact] + public static void op_CheckedDecrementTest() + { + Assert.Equal((uint)0x00000000, DecrementOperatorsHelper.op_CheckedDecrement((uint)0x00000001)); + Assert.Equal((uint)0x7FFFFFFE, DecrementOperatorsHelper.op_CheckedDecrement((uint)0x7FFFFFFF)); + Assert.Equal((uint)0x7FFFFFFF, DecrementOperatorsHelper.op_CheckedDecrement((uint)0x80000000)); + Assert.Equal((uint)0xFFFFFFFE, DecrementOperatorsHelper.op_CheckedDecrement((uint)0xFFFFFFFF)); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement((uint)0x00000000)); + } + [Fact] public static void op_DivisionTest() { @@ -223,6 +246,20 @@ public static void op_DivisionTest() Assert.Equal((uint)0x3FFFFFFF, DivisionOperatorsHelper.op_Division((uint)0x7FFFFFFF, 2)); Assert.Equal((uint)0x40000000, DivisionOperatorsHelper.op_Division((uint)0x80000000, 2)); Assert.Equal((uint)0x7FFFFFFF, DivisionOperatorsHelper.op_Division((uint)0xFFFFFFFF, 2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((uint)0x00000001, 0)); + } + + [Fact] + public static void op_CheckedDivisionTest() + { + Assert.Equal((uint)0x00000000, DivisionOperatorsHelper.op_CheckedDivision((uint)0x00000000, 2)); + Assert.Equal((uint)0x00000000, DivisionOperatorsHelper.op_CheckedDivision((uint)0x00000001, 2)); + Assert.Equal((uint)0x3FFFFFFF, DivisionOperatorsHelper.op_CheckedDivision((uint)0x7FFFFFFF, 2)); + Assert.Equal((uint)0x40000000, DivisionOperatorsHelper.op_CheckedDivision((uint)0x80000000, 2)); + Assert.Equal((uint)0x7FFFFFFF, DivisionOperatorsHelper.op_CheckedDivision((uint)0xFFFFFFFF, 2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((uint)0x00000001, 0)); } [Fact] @@ -255,6 +292,17 @@ public static void op_IncrementTest() Assert.Equal((uint)0x00000000, IncrementOperatorsHelper.op_Increment((uint)0xFFFFFFFF)); } + [Fact] + public static void op_CheckedIncrementTest() + { + Assert.Equal((uint)0x00000001, IncrementOperatorsHelper.op_CheckedIncrement((uint)0x00000000)); + Assert.Equal((uint)0x00000002, IncrementOperatorsHelper.op_CheckedIncrement((uint)0x00000001)); + Assert.Equal((uint)0x80000000, IncrementOperatorsHelper.op_CheckedIncrement((uint)0x7FFFFFFF)); + Assert.Equal((uint)0x80000001, IncrementOperatorsHelper.op_CheckedIncrement((uint)0x80000000)); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((uint)0xFFFFFFFF)); + } + [Fact] public static void op_ModulusTest() { @@ -263,6 +311,8 @@ public static void op_ModulusTest() Assert.Equal((uint)0x00000001, ModulusOperatorsHelper.op_Modulus((uint)0x7FFFFFFF, 2)); Assert.Equal((uint)0x00000000, ModulusOperatorsHelper.op_Modulus((uint)0x80000000, 2)); Assert.Equal((uint)0x00000001, ModulusOperatorsHelper.op_Modulus((uint)0xFFFFFFFF, 2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((uint)0x00000001, 0)); } [Fact] @@ -275,6 +325,17 @@ public static void op_MultiplyTest() Assert.Equal((uint)0xFFFFFFFE, MultiplyOperatorsHelper.op_Multiply((uint)0xFFFFFFFF, 2)); } + [Fact] + public static void op_CheckedMultiplyTest() + { + Assert.Equal((uint)0x00000000, MultiplyOperatorsHelper.op_CheckedMultiply((uint)0x00000000, 2)); + Assert.Equal((uint)0x00000002, MultiplyOperatorsHelper.op_CheckedMultiply((uint)0x00000001, 2)); + Assert.Equal((uint)0xFFFFFFFE, MultiplyOperatorsHelper.op_CheckedMultiply((uint)0x7FFFFFFF, 2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((uint)0x80000000, 2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((uint)0xFFFFFFFF, 2)); + } + [Fact] public static void AbsTest() { @@ -1003,7 +1064,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { Assert.Equal((uint)0x00000000, ShiftOperatorsHelper.op_LeftShift((uint)0x00000000, 1)); @@ -1033,6 +1093,17 @@ public static void op_SubtractionTest() Assert.Equal((uint)0xFFFFFFFE, SubtractionOperatorsHelper.op_Subtraction((uint)0xFFFFFFFF, 1)); } + [Fact] + public static void op_CheckedSubtractionTest() + { + Assert.Equal((uint)0x00000000, SubtractionOperatorsHelper.op_CheckedSubtraction((uint)0x00000001, 1)); + Assert.Equal((uint)0x7FFFFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((uint)0x7FFFFFFF, 1)); + Assert.Equal((uint)0x7FFFFFFF, SubtractionOperatorsHelper.op_CheckedSubtraction((uint)0x80000000, 1)); + Assert.Equal((uint)0xFFFFFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((uint)0xFFFFFFFF, 1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction((uint)0x00000000, 1)); + } + [Fact] public static void op_UnaryNegationTest() { @@ -1043,6 +1114,17 @@ public static void op_UnaryNegationTest() Assert.Equal((uint)0x00000001, UnaryNegationOperatorsHelper.op_UnaryNegation((uint)0xFFFFFFFF)); } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + Assert.Equal((uint)0x00000000, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((uint)0x00000000)); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((uint)0x00000001)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((uint)0x7FFFFFFF)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((uint)0x80000000)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((uint)0xFFFFFFFF)); + } + [Fact] public static void op_UnaryPlusTest() { diff --git a/src/libraries/System.Runtime/tests/System/UInt64Tests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/UInt64Tests.GenericMath.cs index bea9f59475b29..ff7ec0c254502 100644 --- a/src/libraries/System.Runtime/tests/System/UInt64Tests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/UInt64Tests.GenericMath.cs @@ -55,6 +55,17 @@ public static void op_AdditionTest() Assert.Equal((ulong)0x0000000000000000, AdditionOperatorsHelper.op_Addition((ulong)0xFFFFFFFFFFFFFFFF, 1)); } + [Fact] + public static void op_CheckedAdditionTest() + { + Assert.Equal((ulong)0x0000000000000001, AdditionOperatorsHelper.op_CheckedAddition((ulong)0x0000000000000000, 1)); + Assert.Equal((ulong)0x0000000000000002, AdditionOperatorsHelper.op_CheckedAddition((ulong)0x0000000000000001, 1)); + Assert.Equal((ulong)0x8000000000000000, AdditionOperatorsHelper.op_CheckedAddition((ulong)0x7FFFFFFFFFFFFFFF, 1)); + Assert.Equal((ulong)0x8000000000000001, AdditionOperatorsHelper.op_CheckedAddition((ulong)0x8000000000000000, 1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((ulong)0xFFFFFFFFFFFFFFFF, 1)); + } + [Fact] public static void LeadingZeroCountTest() { @@ -215,6 +226,17 @@ public static void op_DecrementTest() Assert.Equal((ulong)0xFFFFFFFFFFFFFFFE, DecrementOperatorsHelper.op_Decrement((ulong)0xFFFFFFFFFFFFFFFF)); } + [Fact] + public static void op_CheckedDecrementTest() + { + Assert.Equal((ulong)0x0000000000000000, DecrementOperatorsHelper.op_CheckedDecrement((ulong)0x0000000000000001)); + Assert.Equal((ulong)0x7FFFFFFFFFFFFFFE, DecrementOperatorsHelper.op_CheckedDecrement((ulong)0x7FFFFFFFFFFFFFFF)); + Assert.Equal((ulong)0x7FFFFFFFFFFFFFFF, DecrementOperatorsHelper.op_CheckedDecrement((ulong)0x8000000000000000)); + Assert.Equal((ulong)0xFFFFFFFFFFFFFFFE, DecrementOperatorsHelper.op_CheckedDecrement((ulong)0xFFFFFFFFFFFFFFFF)); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement((ulong)0x0000000000000000)); + } + [Fact] public static void op_DivisionTest() { @@ -223,6 +245,20 @@ public static void op_DivisionTest() Assert.Equal((ulong)0x3FFFFFFFFFFFFFFF, DivisionOperatorsHelper.op_Division((ulong)0x7FFFFFFFFFFFFFFF, 2)); Assert.Equal((ulong)0x4000000000000000, DivisionOperatorsHelper.op_Division((ulong)0x8000000000000000, 2)); Assert.Equal((ulong)0x7FFFFFFFFFFFFFFF, DivisionOperatorsHelper.op_Division((ulong)0xFFFFFFFFFFFFFFFF, 2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((ulong)0x0000000000000001, 0)); + } + + [Fact] + public static void op_CheckedDivisionTest() + { + Assert.Equal((ulong)0x0000000000000000, DivisionOperatorsHelper.op_CheckedDivision((ulong)0x0000000000000000, 2)); + Assert.Equal((ulong)0x0000000000000000, DivisionOperatorsHelper.op_CheckedDivision((ulong)0x0000000000000001, 2)); + Assert.Equal((ulong)0x3FFFFFFFFFFFFFFF, DivisionOperatorsHelper.op_CheckedDivision((ulong)0x7FFFFFFFFFFFFFFF, 2)); + Assert.Equal((ulong)0x4000000000000000, DivisionOperatorsHelper.op_CheckedDivision((ulong)0x8000000000000000, 2)); + Assert.Equal((ulong)0x7FFFFFFFFFFFFFFF, DivisionOperatorsHelper.op_CheckedDivision((ulong)0xFFFFFFFFFFFFFFFF, 2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((ulong)0x0000000000000001, 0)); } [Fact] @@ -255,6 +291,17 @@ public static void op_IncrementTest() Assert.Equal((ulong)0x0000000000000000, IncrementOperatorsHelper.op_Increment((ulong)0xFFFFFFFFFFFFFFFF)); } + [Fact] + public static void op_CheckedIncrementTest() + { + Assert.Equal((ulong)0x0000000000000001, IncrementOperatorsHelper.op_CheckedIncrement((ulong)0x0000000000000000)); + Assert.Equal((ulong)0x0000000000000002, IncrementOperatorsHelper.op_CheckedIncrement((ulong)0x0000000000000001)); + Assert.Equal((ulong)0x8000000000000000, IncrementOperatorsHelper.op_CheckedIncrement((ulong)0x7FFFFFFFFFFFFFFF)); + Assert.Equal((ulong)0x8000000000000001, IncrementOperatorsHelper.op_CheckedIncrement((ulong)0x8000000000000000)); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((ulong)0xFFFFFFFFFFFFFFFF)); + } + [Fact] public static void op_ModulusTest() { @@ -263,6 +310,8 @@ public static void op_ModulusTest() Assert.Equal((ulong)0x0000000000000001, ModulusOperatorsHelper.op_Modulus((ulong)0x7FFFFFFFFFFFFFFF, 2)); Assert.Equal((ulong)0x0000000000000000, ModulusOperatorsHelper.op_Modulus((ulong)0x8000000000000000, 2)); Assert.Equal((ulong)0x0000000000000001, ModulusOperatorsHelper.op_Modulus((ulong)0xFFFFFFFFFFFFFFFF, 2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((ulong)0x0000000000000001, 0)); } [Fact] @@ -274,6 +323,17 @@ public static void op_MultiplyTest() Assert.Equal((ulong)0x0000000000000000, MultiplyOperatorsHelper.op_Multiply((ulong)0x8000000000000000, 2)); Assert.Equal((ulong)0xFFFFFFFFFFFFFFFE, MultiplyOperatorsHelper.op_Multiply((ulong)0xFFFFFFFFFFFFFFFF, 2)); } + [Fact] + public static void op_CheckedMultiplyTest() + { + Assert.Equal((ulong)0x0000000000000000, MultiplyOperatorsHelper.op_CheckedMultiply((ulong)0x0000000000000000, 2)); + Assert.Equal((ulong)0x0000000000000002, MultiplyOperatorsHelper.op_CheckedMultiply((ulong)0x0000000000000001, 2)); + Assert.Equal((ulong)0xFFFFFFFFFFFFFFFE, MultiplyOperatorsHelper.op_CheckedMultiply((ulong)0x7FFFFFFFFFFFFFFF, 2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((ulong)0x8000000000000000, 2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((ulong)0xFFFFFFFFFFFFFFFF, 2)); + } + [Fact] public static void AbsTest() @@ -1003,7 +1063,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { Assert.Equal((ulong)0x0000000000000000, ShiftOperatorsHelper.op_LeftShift((ulong)0x0000000000000000, 1)); @@ -1033,6 +1092,17 @@ public static void op_SubtractionTest() Assert.Equal((ulong)0xFFFFFFFFFFFFFFFE, SubtractionOperatorsHelper.op_Subtraction((ulong)0xFFFFFFFFFFFFFFFF, 1)); } + [Fact] + public static void op_CheckedSubtractionTest() + { + Assert.Equal((ulong)0x0000000000000000, SubtractionOperatorsHelper.op_CheckedSubtraction((ulong)0x0000000000000001, 1)); + Assert.Equal((ulong)0x7FFFFFFFFFFFFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((ulong)0x7FFFFFFFFFFFFFFF, 1)); + Assert.Equal((ulong)0x7FFFFFFFFFFFFFFF, SubtractionOperatorsHelper.op_CheckedSubtraction((ulong)0x8000000000000000, 1)); + Assert.Equal((ulong)0xFFFFFFFFFFFFFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((ulong)0xFFFFFFFFFFFFFFFF, 1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction((ulong)0x0000000000000000, 1)); + } + [Fact] public static void op_UnaryNegationTest() { @@ -1043,6 +1113,17 @@ public static void op_UnaryNegationTest() Assert.Equal((ulong)0x0000000000000001, UnaryNegationOperatorsHelper.op_UnaryNegation((ulong)0xFFFFFFFFFFFFFFFF)); } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + Assert.Equal((ulong)0x0000000000000000, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((ulong)0x0000000000000000)); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((ulong)0x0000000000000001)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((ulong)0x7FFFFFFFFFFFFFFF)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((ulong)0x8000000000000000)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((ulong)0xFFFFFFFFFFFFFFFF)); + } + [Fact] public static void op_UnaryPlusTest() { diff --git a/src/libraries/System.Runtime/tests/System/UIntPtrTests.GenericMath.cs b/src/libraries/System.Runtime/tests/System/UIntPtrTests.GenericMath.cs index d39fe0b5fc929..74678772523f1 100644 --- a/src/libraries/System.Runtime/tests/System/UIntPtrTests.GenericMath.cs +++ b/src/libraries/System.Runtime/tests/System/UIntPtrTests.GenericMath.cs @@ -73,6 +73,29 @@ public static void op_AdditionTest() } } + [Fact] + public static void op_CheckedAdditionTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nuint)0x0000000000000001), AdditionOperatorsHelper.op_CheckedAddition(unchecked((nuint)0x0000000000000000), (nuint)1)); + Assert.Equal(unchecked((nuint)0x0000000000000002), AdditionOperatorsHelper.op_CheckedAddition(unchecked((nuint)0x0000000000000001), (nuint)1)); + Assert.Equal(unchecked((nuint)0x8000000000000000), AdditionOperatorsHelper.op_CheckedAddition(unchecked((nuint)0x7FFFFFFFFFFFFFFF), (nuint)1)); + Assert.Equal(unchecked((nuint)0x8000000000000001), AdditionOperatorsHelper.op_CheckedAddition(unchecked((nuint)0x8000000000000000), (nuint)1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition(unchecked((nuint)0xFFFFFFFFFFFFFFFF), (nuint)1)); + } + else + { + Assert.Equal((nuint)0x00000001, AdditionOperatorsHelper.op_CheckedAddition((nuint)0x00000000, (nuint)1)); + Assert.Equal((nuint)0x00000002, AdditionOperatorsHelper.op_CheckedAddition((nuint)0x00000001, (nuint)1)); + Assert.Equal((nuint)0x80000000, AdditionOperatorsHelper.op_CheckedAddition((nuint)0x7FFFFFFF, (nuint)1)); + Assert.Equal((nuint)0x80000001, AdditionOperatorsHelper.op_CheckedAddition((nuint)0x80000000, (nuint)1)); + + Assert.Throws(() => AdditionOperatorsHelper.op_CheckedAddition((nuint)0xFFFFFFFF, (nuint)1)); + } + } + [Fact] public static void LeadingZeroCountTest() { @@ -409,6 +432,29 @@ public static void op_DecrementTest() } } + [Fact] + public static void op_CheckedDecrementTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nuint)0x0000000000000000), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nuint)0x0000000000000001))); + Assert.Equal(unchecked((nuint)0x7FFFFFFFFFFFFFFE), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nuint)0x7FFFFFFFFFFFFFFF))); + Assert.Equal(unchecked((nuint)0x7FFFFFFFFFFFFFFF), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nuint)0x8000000000000000))); + Assert.Equal(unchecked((nuint)0xFFFFFFFFFFFFFFFE), DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nuint)0xFFFFFFFFFFFFFFFF))); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement(unchecked((nuint)0x0000000000000000))); + } + else + { + Assert.Equal((nuint)0x00000000, DecrementOperatorsHelper.op_CheckedDecrement((nuint)0x00000001)); + Assert.Equal((nuint)0x7FFFFFFE, DecrementOperatorsHelper.op_CheckedDecrement((nuint)0x7FFFFFFF)); + Assert.Equal((nuint)0x7FFFFFFF, DecrementOperatorsHelper.op_CheckedDecrement((nuint)0x80000000)); + Assert.Equal((nuint)0xFFFFFFFE, DecrementOperatorsHelper.op_CheckedDecrement((nuint)0xFFFFFFFF)); + + Assert.Throws(() => DecrementOperatorsHelper.op_CheckedDecrement((nuint)0x00000000)); + } + } + [Fact] public static void op_DivisionTest() { @@ -419,6 +465,8 @@ public static void op_DivisionTest() Assert.Equal(unchecked((nuint)0x3FFFFFFFFFFFFFFF), DivisionOperatorsHelper.op_Division(unchecked((nuint)0x7FFFFFFFFFFFFFFF), (nuint)2)); Assert.Equal(unchecked((nuint)0x4000000000000000), DivisionOperatorsHelper.op_Division(unchecked((nuint)0x8000000000000000), (nuint)2)); Assert.Equal(unchecked((nuint)0x7FFFFFFFFFFFFFFF), DivisionOperatorsHelper.op_Division(unchecked((nuint)0xFFFFFFFFFFFFFFFF), (nuint)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division(unchecked((nuint)0x0000000000000001), (nuint)0)); } else { @@ -427,6 +475,33 @@ public static void op_DivisionTest() Assert.Equal((nuint)0x3FFFFFFF, DivisionOperatorsHelper.op_Division((nuint)0x7FFFFFFF, (nuint)2)); Assert.Equal((nuint)0x40000000, DivisionOperatorsHelper.op_Division((nuint)0x80000000, (nuint)2)); Assert.Equal((nuint)0x7FFFFFFF, DivisionOperatorsHelper.op_Division((nuint)0xFFFFFFFF, (nuint)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_Division((nuint)0x00000001, (nuint)0)); + } + } + + [Fact] + public static void op_CheckedDivisionTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nuint)0x0000000000000000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nuint)0x0000000000000000), (nuint)2)); + Assert.Equal(unchecked((nuint)0x0000000000000000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nuint)0x0000000000000001), (nuint)2)); + Assert.Equal(unchecked((nuint)0x3FFFFFFFFFFFFFFF), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nuint)0x7FFFFFFFFFFFFFFF), (nuint)2)); + Assert.Equal(unchecked((nuint)0x4000000000000000), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nuint)0x8000000000000000), (nuint)2)); + Assert.Equal(unchecked((nuint)0x7FFFFFFFFFFFFFFF), DivisionOperatorsHelper.op_CheckedDivision(unchecked((nuint)0xFFFFFFFFFFFFFFFF), (nuint)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision(unchecked((nuint)0x0000000000000001), (nuint)0)); + } + else + { + Assert.Equal((nuint)0x00000000, DivisionOperatorsHelper.op_CheckedDivision((nuint)0x00000000, (nuint)2)); + Assert.Equal((nuint)0x00000000, DivisionOperatorsHelper.op_CheckedDivision((nuint)0x00000001, (nuint)2)); + Assert.Equal((nuint)0x3FFFFFFF, DivisionOperatorsHelper.op_CheckedDivision((nuint)0x7FFFFFFF, (nuint)2)); + Assert.Equal((nuint)0x40000000, DivisionOperatorsHelper.op_CheckedDivision((nuint)0x80000000, (nuint)2)); + Assert.Equal((nuint)0x7FFFFFFF, DivisionOperatorsHelper.op_CheckedDivision((nuint)0xFFFFFFFF, (nuint)2)); + + Assert.Throws(() => DivisionOperatorsHelper.op_CheckedDivision((nuint)0x00000001, (nuint)0)); } } @@ -493,6 +568,29 @@ public static void op_IncrementTest() } } + [Fact] + public static void op_CheckedIncrementTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nuint)0x0000000000000001), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nuint)0x0000000000000000))); + Assert.Equal(unchecked((nuint)0x0000000000000002), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nuint)0x0000000000000001))); + Assert.Equal(unchecked((nuint)0x8000000000000000), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nuint)0x7FFFFFFFFFFFFFFF))); + Assert.Equal(unchecked((nuint)0x8000000000000001), IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nuint)0x8000000000000000))); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement(unchecked((nuint)0xFFFFFFFFFFFFFFFF))); + } + else + { + Assert.Equal((nuint)0x00000001, IncrementOperatorsHelper.op_CheckedIncrement((nuint)0x00000000)); + Assert.Equal((nuint)0x00000002, IncrementOperatorsHelper.op_CheckedIncrement((nuint)0x00000001)); + Assert.Equal((nuint)0x80000000, IncrementOperatorsHelper.op_CheckedIncrement((nuint)0x7FFFFFFF)); + Assert.Equal((nuint)0x80000001, IncrementOperatorsHelper.op_CheckedIncrement((nuint)0x80000000)); + + Assert.Throws(() => IncrementOperatorsHelper.op_CheckedIncrement((nuint)0xFFFFFFFF)); + } + } + [Fact] public static void op_ModulusTest() { @@ -503,6 +601,8 @@ public static void op_ModulusTest() Assert.Equal(unchecked((nuint)0x0000000000000001), ModulusOperatorsHelper.op_Modulus(unchecked((nuint)0x7FFFFFFFFFFFFFFF), (nuint)2)); Assert.Equal(unchecked((nuint)0x0000000000000000), ModulusOperatorsHelper.op_Modulus(unchecked((nuint)0x8000000000000000), (nuint)2)); Assert.Equal(unchecked((nuint)0x0000000000000001), ModulusOperatorsHelper.op_Modulus(unchecked((nuint)0xFFFFFFFFFFFFFFFF), (nuint)2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus(unchecked((nuint)0x0000000000000001), (nuint)0)); } else { @@ -511,6 +611,8 @@ public static void op_ModulusTest() Assert.Equal((nuint)0x00000001, ModulusOperatorsHelper.op_Modulus((nuint)0x7FFFFFFF, (nuint)2)); Assert.Equal((nuint)0x00000000, ModulusOperatorsHelper.op_Modulus((nuint)0x80000000, (nuint)2)); Assert.Equal((nuint)0x00000001, ModulusOperatorsHelper.op_Modulus((nuint)0xFFFFFFFF, (nuint)2)); + + Assert.Throws(() => ModulusOperatorsHelper.op_Modulus((nuint)0x00000001, (nuint)0)); } } @@ -535,6 +637,29 @@ public static void op_MultiplyTest() } } + [Fact] + public static void op_CheckedMultiplyTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nuint)0x0000000000000000), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nuint)0x0000000000000000), (nuint)2)); + Assert.Equal(unchecked((nuint)0x0000000000000002), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nuint)0x0000000000000001), (nuint)2)); + Assert.Equal(unchecked((nuint)0xFFFFFFFFFFFFFFFE), MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nuint)0x7FFFFFFFFFFFFFFF), (nuint)2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nuint)0x8000000000000000), (nuint)2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply(unchecked((nuint)0xFFFFFFFFFFFFFFFF), (nuint)2)); + } + else + { + Assert.Equal((nuint)0x00000000, MultiplyOperatorsHelper.op_CheckedMultiply((nuint)0x00000000, (nuint)2)); + Assert.Equal((nuint)0x00000002, MultiplyOperatorsHelper.op_CheckedMultiply((nuint)0x00000001, (nuint)2)); + Assert.Equal((nuint)0xFFFFFFFE, MultiplyOperatorsHelper.op_CheckedMultiply((nuint)0x7FFFFFFF, (nuint)2)); + + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((nuint)0x80000000, (nuint)2)); + Assert.Throws(() => MultiplyOperatorsHelper.op_CheckedMultiply((nuint)0xFFFFFFFF, (nuint)2)); + } + } + [Fact] public static void AbsTest() { @@ -1468,7 +1593,6 @@ public static void TryCreateFromUIntPtrTest() } [Fact] - public static void op_LeftShiftTest() { if (Environment.Is64BitProcess) @@ -1531,6 +1655,29 @@ public static void op_SubtractionTest() } } + [Fact] + public static void op_CheckedSubtractionTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nuint)0x0000000000000000), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nuint)0x0000000000000001), (nuint)1)); + Assert.Equal(unchecked((nuint)0x7FFFFFFFFFFFFFFE), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nuint)0x7FFFFFFFFFFFFFFF), (nuint)1)); + Assert.Equal(unchecked((nuint)0x7FFFFFFFFFFFFFFF), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nuint)0x8000000000000000), (nuint)1)); + Assert.Equal(unchecked((nuint)0xFFFFFFFFFFFFFFFE), SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nuint)0xFFFFFFFFFFFFFFFF), (nuint)1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction(unchecked((nuint)0x0000000000000000), (nuint)1)); + } + else + { + Assert.Equal((nuint)0x00000000, SubtractionOperatorsHelper.op_CheckedSubtraction((nuint)0x00000001, (nuint)1)); + Assert.Equal((nuint)0x7FFFFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((nuint)0x7FFFFFFF, (nuint)1)); + Assert.Equal((nuint)0x7FFFFFFF, SubtractionOperatorsHelper.op_CheckedSubtraction((nuint)0x80000000, (nuint)1)); + Assert.Equal((nuint)0xFFFFFFFE, SubtractionOperatorsHelper.op_CheckedSubtraction((nuint)0xFFFFFFFF, (nuint)1)); + + Assert.Throws(() => SubtractionOperatorsHelper.op_CheckedSubtraction((nuint)0x00000000, (nuint)1)); + } + } + [Fact] public static void op_UnaryNegationTest() { @@ -1552,6 +1699,29 @@ public static void op_UnaryNegationTest() } } + [Fact] + public static void op_CheckedUnaryNegationTest() + { + if (Environment.Is64BitProcess) + { + Assert.Equal(unchecked((nuint)0x0000000000000000), UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nuint)0x0000000000000000))); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nuint)0x0000000000000001))); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nuint)0x7FFFFFFFFFFFFFFF))); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nuint)0x8000000000000000))); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation(unchecked((nuint)0xFFFFFFFFFFFFFFFF))); + } + else + { + Assert.Equal((nuint)0x00000000, UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((nuint)0x00000000)); + + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((nuint)0x00000001)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((nuint)0x7FFFFFFF)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((nuint)0x80000000)); + Assert.Throws(() => UnaryNegationOperatorsHelper.op_CheckedUnaryNegation((nuint)0xFFFFFFFF)); + } + } + [Fact] public static void op_UnaryPlusTest() { From 518a4465ac28219fb12dfc17a5fcebbe7e71b004 Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Thu, 7 Apr 2022 16:39:56 -0700 Subject: [PATCH 5/7] Remove the checked() context from integer division, since there is no behavioral difference on .NET --- src/libraries/System.Private.CoreLib/src/System/Byte.cs | 2 +- src/libraries/System.Private.CoreLib/src/System/Char.cs | 2 +- src/libraries/System.Private.CoreLib/src/System/Int16.cs | 2 +- src/libraries/System.Private.CoreLib/src/System/Int32.cs | 2 +- src/libraries/System.Private.CoreLib/src/System/Int64.cs | 2 +- src/libraries/System.Private.CoreLib/src/System/IntPtr.cs | 2 +- src/libraries/System.Private.CoreLib/src/System/SByte.cs | 2 +- src/libraries/System.Private.CoreLib/src/System/UInt16.cs | 2 +- src/libraries/System.Private.CoreLib/src/System/UInt32.cs | 2 +- src/libraries/System.Private.CoreLib/src/System/UInt64.cs | 2 +- src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Byte.cs b/src/libraries/System.Private.CoreLib/src/System/Byte.cs index f114aed420c6d..9cfb92c35f96b 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Byte.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Byte.cs @@ -392,7 +392,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static byte IDivisionOperators.operator /(byte left, byte right) => (byte)(left / right); // /// - static byte IDivisionOperators.operator checked /(byte left, byte right) => checked((byte)(left / right)); + static byte IDivisionOperators.operator checked /(byte left, byte right) => (byte)(left / right); // // IEqualityOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Char.cs b/src/libraries/System.Private.CoreLib/src/System/Char.cs index e265e0885c04c..fb2f418adec52 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Char.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Char.cs @@ -1160,7 +1160,7 @@ public static int ConvertToUtf32(string s, int index) static char IDivisionOperators.operator /(char left, char right) => (char)(left / right); // /// - static char IDivisionOperators.operator checked /(char left, char right) => checked((char)(left / right)); + static char IDivisionOperators.operator checked /(char left, char right) => (char)(left / right); // // IEqualityOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Int16.cs b/src/libraries/System.Private.CoreLib/src/System/Int16.cs index d07d273a34294..fa7ac4c6960cd 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int16.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int16.cs @@ -405,7 +405,7 @@ public static short Log2(short value) static short IDivisionOperators.operator /(short left, short right) => (short)(left / right); // /// - static short IDivisionOperators.operator checked /(short left, short right) => checked((short)(left / right)); + static short IDivisionOperators.operator checked /(short left, short right) => (short)(left / right); // // IEqualityOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Int32.cs b/src/libraries/System.Private.CoreLib/src/System/Int32.cs index bec3b7c970644..c1e518268ef34 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int32.cs @@ -397,7 +397,7 @@ public static int Log2(int value) static int IDivisionOperators.operator /(int left, int right) => left / right; // /// - static int IDivisionOperators.operator checked /(int left, int right) => checked(left / right); + static int IDivisionOperators.operator checked /(int left, int right) => left / right; // // IEqualityOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/Int64.cs b/src/libraries/System.Private.CoreLib/src/System/Int64.cs index eeaef27f9f3ab..aa2a41dfa39a2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int64.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int64.cs @@ -384,7 +384,7 @@ public static long Log2(long value) static long IDivisionOperators.operator /(long left, long right) => left / right; // /// - static long IDivisionOperators.operator checked /(long left, long right) => checked(left / right); + static long IDivisionOperators.operator checked /(long left, long right) => left / right; // // IEqualityOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs index 009f2f1de0f13..271017ff1220f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs @@ -427,7 +427,7 @@ static nint IBinaryNumber.Log2(nint value) static nint IDivisionOperators.operator /(nint left, nint right) => left / right; // /// - static nint IDivisionOperators.operator checked /(nint left, nint right) => checked(left / right); + static nint IDivisionOperators.operator checked /(nint left, nint right) => left / right; // // IIncrementOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/SByte.cs b/src/libraries/System.Private.CoreLib/src/System/SByte.cs index 2a65d83b42cec..2d6670ee6257c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SByte.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SByte.cs @@ -413,7 +413,7 @@ public static sbyte Log2(sbyte value) static sbyte IDivisionOperators.operator /(sbyte left, sbyte right) => (sbyte)(left / right); // /// - static sbyte IDivisionOperators.operator checked /(sbyte left, sbyte right) => checked((sbyte)(left / right)); + static sbyte IDivisionOperators.operator checked /(sbyte left, sbyte right) => (sbyte)(left / right); // // IEqualityOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt16.cs b/src/libraries/System.Private.CoreLib/src/System/UInt16.cs index 8d2f47179248e..97a4afa663d03 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt16.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt16.cs @@ -386,7 +386,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ushort IDivisionOperators.operator /(ushort left, ushort right) => (ushort)(left / right); // /// - static ushort IDivisionOperators.operator checked /(ushort left, ushort right) => checked((ushort)(left / right)); + static ushort IDivisionOperators.operator checked /(ushort left, ushort right) => (ushort)(left / right); // // IEqualityOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt32.cs b/src/libraries/System.Private.CoreLib/src/System/UInt32.cs index ab341f800e123..17f6e898b317a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt32.cs @@ -372,7 +372,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static uint IDivisionOperators.operator /(uint left, uint right) => left / right; // /// - static uint IDivisionOperators.operator checked /(uint left, uint right) => checked(left / right); + static uint IDivisionOperators.operator checked /(uint left, uint right) => left / right; // // IEqualityOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt64.cs b/src/libraries/System.Private.CoreLib/src/System/UInt64.cs index eb6c5880043f6..e1565e833467c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt64.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt64.cs @@ -371,7 +371,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) static ulong IDivisionOperators.operator /(ulong left, ulong right) => left / right; // /// - static ulong IDivisionOperators.operator checked /(ulong left, ulong right) => checked(left / right); + static ulong IDivisionOperators.operator checked /(ulong left, ulong right) => left / right; // // IEqualityOperators diff --git a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs index 544399d466497..5c55066d981d5 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs @@ -424,7 +424,7 @@ static nuint IBinaryNumber.Log2(nuint value) static nuint IDivisionOperators.operator /(nuint left, nuint right) => left / right; // /// - static nuint IDivisionOperators.operator checked /(nuint left, nuint right) => checked(left / right); + static nuint IDivisionOperators.operator checked /(nuint left, nuint right) => left / right; // // IIncrementOperators From 910d9744a4be8517e6e00c6b78f7c7c47f9049fd Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Thu, 7 Apr 2022 16:50:19 -0700 Subject: [PATCH 6/7] Ensure the doc comments around user-defined checked operators are uncommented --- .../System.Private.CoreLib/src/System/Byte.cs | 16 ++--- .../System.Private.CoreLib/src/System/Char.cs | 16 ++--- .../src/System/DateTime.cs | 6 +- .../src/System/DateTimeOffset.cs | 6 +- .../src/System/Decimal.cs | 14 ++--- .../src/System/Double.cs | 58 +++++++++---------- .../System.Private.CoreLib/src/System/Half.cs | 58 +++++++++---------- .../src/System/Int16.cs | 16 ++--- .../src/System/Int32.cs | 16 ++--- .../src/System/Int64.cs | 16 ++--- .../src/System/IntPtr.cs | 16 ++--- .../src/System/Numerics/IAdditionOperators.cs | 10 ++-- .../System/Numerics/IDecrementOperators.cs | 8 +-- .../src/System/Numerics/IDivisionOperators.cs | 10 ++-- .../System/Numerics/IIncrementOperators.cs | 8 +-- .../src/System/Numerics/IMultiplyOperators.cs | 10 ++-- .../System/Numerics/ISubtractionOperators.cs | 10 ++-- .../Numerics/IUnaryNegationOperators.cs | 8 +-- .../src/System/SByte.cs | 16 ++--- .../src/System/Single.cs | 58 +++++++++---------- .../src/System/TimeOnly.cs | 2 +- .../src/System/TimeSpan.cs | 12 ++-- .../src/System/UInt16.cs | 16 ++--- .../src/System/UInt32.cs | 16 ++--- .../src/System/UInt64.cs | 16 ++--- .../src/System/UIntPtr.cs | 16 ++--- 26 files changed, 227 insertions(+), 227 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Byte.cs b/src/libraries/System.Private.CoreLib/src/System/Byte.cs index 9cfb92c35f96b..25058eec9912f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Byte.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Byte.cs @@ -300,7 +300,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static byte IAdditionOperators.operator +(byte left, byte right) => (byte)(left + right); - // /// + /// static byte IAdditionOperators.operator checked +(byte left, byte right) => checked((byte)(left + right)); // @@ -381,7 +381,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static byte IDecrementOperators.operator --(byte value) => --value; - // /// + /// static byte IDecrementOperators.operator checked --(byte value) => checked(--value); // @@ -391,7 +391,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static byte IDivisionOperators.operator /(byte left, byte right) => (byte)(left / right); - // /// + /// static byte IDivisionOperators.operator checked /(byte left, byte right) => (byte)(left / right); // @@ -411,7 +411,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static byte IIncrementOperators.operator ++(byte value) => ++value; - // /// + /// static byte IIncrementOperators.operator checked ++(byte value) => checked(++value); // @@ -445,7 +445,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static byte IMultiplyOperators.operator *(byte left, byte right) => (byte)(left * right); - // /// + /// static byte IMultiplyOperators.operator checked *(byte left, byte right) => checked((byte)(left * right)); // @@ -917,7 +917,7 @@ public static bool TryCreate(TOther value, out byte result) /// static byte IShiftOperators.operator >>(byte value, int shiftAmount) => (byte)(value >> shiftAmount); - // /// + /// // static byte IShiftOperators.operator >>>(byte value, int shiftAmount) => (byte)(value >> shiftAmount); // @@ -937,7 +937,7 @@ public static bool TryCreate(TOther value, out byte result) /// static byte ISubtractionOperators.operator -(byte left, byte right) => (byte)(left - right); - // /// + /// static byte ISubtractionOperators.operator checked -(byte left, byte right) => checked((byte)(left - right)); // @@ -947,7 +947,7 @@ public static bool TryCreate(TOther value, out byte result) /// static byte IUnaryNegationOperators.operator -(byte value) => (byte)(-value); - // /// + /// static byte IUnaryNegationOperators.operator checked -(byte value) => checked((byte)(-value)); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Char.cs b/src/libraries/System.Private.CoreLib/src/System/Char.cs index fb2f418adec52..0a9116994a76f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Char.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Char.cs @@ -1068,7 +1068,7 @@ public static int ConvertToUtf32(string s, int index) /// static char IAdditionOperators.operator +(char left, char right) => (char) (left + right); - // /// + /// static char IAdditionOperators.operator checked +(char left, char right) => checked((char)(left + right)); // @@ -1149,7 +1149,7 @@ public static int ConvertToUtf32(string s, int index) /// static char IDecrementOperators.operator --(char value) => --value; - // /// + /// static char IDecrementOperators.operator checked --(char value) => checked(--value); // @@ -1159,7 +1159,7 @@ public static int ConvertToUtf32(string s, int index) /// static char IDivisionOperators.operator /(char left, char right) => (char)(left / right); - // /// + /// static char IDivisionOperators.operator checked /(char left, char right) => (char)(left / right); // @@ -1179,7 +1179,7 @@ public static int ConvertToUtf32(string s, int index) /// static char IIncrementOperators.operator ++(char value) => ++value; - // /// + /// static char IIncrementOperators.operator checked ++(char value) => checked(++value); // @@ -1213,7 +1213,7 @@ public static int ConvertToUtf32(string s, int index) /// static char IMultiplyOperators.operator *(char left, char right) => (char)(left * right); - // /// + /// static char IMultiplyOperators.operator checked *(char left, char right) => checked((char)(left * right)); // @@ -1699,7 +1699,7 @@ static bool INumber.TryParse(ReadOnlySpan s, NumberStyles style, IFo /// static char IShiftOperators.operator >>(char value, int shiftAmount) => (char)(value >> shiftAmount); - // /// + /// // static char IShiftOperators.operator >>>(char value, int shiftAmount) => (char)(value >> shiftAmount); // @@ -1733,7 +1733,7 @@ static bool ISpanParsable.TryParse(ReadOnlySpan s, IFormatProvider? /// static char ISubtractionOperators.operator -(char left, char right) => (char)(left - right); - // /// + /// static char ISubtractionOperators.operator checked -(char left, char right) => checked((char)(left - right)); // @@ -1743,7 +1743,7 @@ static bool ISpanParsable.TryParse(ReadOnlySpan s, IFormatProvider? /// static char IUnaryNegationOperators.operator -(char value) => (char)(-value); - // /// + /// static char IUnaryNegationOperators.operator checked -(char value) => checked((char)(-value)); // diff --git a/src/libraries/System.Private.CoreLib/src/System/DateTime.cs b/src/libraries/System.Private.CoreLib/src/System/DateTime.cs index 984ca1adddf7f..a7bd97628c648 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DateTime.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DateTime.cs @@ -1511,7 +1511,7 @@ internal static bool TryCreate(int year, int month, int day, int hour, int minut // IAdditionOperators // - // /// + /// static DateTime IAdditionOperators.operator checked +(DateTime left, TimeSpan right) => left + right; // @@ -1550,10 +1550,10 @@ internal static bool TryCreate(int year, int month, int day, int hour, int minut // ISubtractionOperators // - // /// + /// static DateTime ISubtractionOperators.operator checked -(DateTime left, TimeSpan right) => left - right; - // /// + /// static TimeSpan ISubtractionOperators.operator checked -(DateTime left, DateTime right) => left - right; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs b/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs index 75fe77d5aee09..bb064a960099c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs +++ b/src/libraries/System.Private.CoreLib/src/System/DateTimeOffset.cs @@ -867,7 +867,7 @@ public static implicit operator DateTimeOffset(DateTime dateTime) => // IAdditionOperators // - // /// + /// static DateTimeOffset IAdditionOperators.operator checked +(DateTimeOffset left, TimeSpan right) => left + right; // @@ -906,10 +906,10 @@ public static implicit operator DateTimeOffset(DateTime dateTime) => // ISubtractionOperators // - // /// + /// static DateTimeOffset ISubtractionOperators.operator checked -(DateTimeOffset left, TimeSpan right) => left - right; - // /// + /// static TimeSpan ISubtractionOperators.operator checked -(DateTimeOffset left, DateTimeOffset right) => left - right; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Decimal.cs b/src/libraries/System.Private.CoreLib/src/System/Decimal.cs index 084627db9d0b1..a73492e7b26f8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Decimal.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Decimal.cs @@ -1082,7 +1082,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) // IAdditionOperators // - // /// + /// static decimal IAdditionOperators.operator checked +(decimal left, decimal right) => left + right; // @@ -1096,21 +1096,21 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) // IDecrementOperators // - // /// + /// static decimal IDecrementOperators.operator checked --(decimal value) => --value; // // IDivisionOperators // - // /// + /// static decimal IDivisionOperators.operator checked /(decimal left, decimal right) => left / right; // // IIncrementOperators // - // /// + /// static decimal IIncrementOperators.operator checked ++(decimal value) => ++value; // @@ -1134,7 +1134,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) // IMultiplyOperators // - // /// + /// public static decimal operator checked *(decimal left, decimal right) => left * right; // @@ -1504,14 +1504,14 @@ public static bool TryCreate(TOther value, out decimal result) // ISubtractionOperators // - // /// + /// static decimal ISubtractionOperators.operator checked -(decimal left, decimal right) => left - right; // // IUnaryNegationOperators // - // /// + /// static decimal IUnaryNegationOperators.operator checked -(decimal value) => -value; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Double.cs b/src/libraries/System.Private.CoreLib/src/System/Double.cs index c86eef3ad8349..6b6bd94375325 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Double.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Double.cs @@ -491,7 +491,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static double IAdditionOperators.operator +(double left, double right) => left + right; - // /// + /// static double IAdditionOperators.operator checked +(double left, double right) => left + right; // @@ -560,7 +560,7 @@ public static bool IsPow2(double value) /// static double IDecrementOperators.operator --(double value) => --value; - // /// + /// static double IDecrementOperators.operator checked --(double value) => --value; // @@ -570,7 +570,7 @@ public static bool IsPow2(double value) /// static double IDivisionOperators.operator /(double left, double right) => left / right; - // /// + /// static double IDivisionOperators.operator checked /(double left, double right) => left / right; // @@ -580,19 +580,19 @@ public static bool IsPow2(double value) /// public static double Exp(double x) => Math.Exp(x); - // /// + /// // public static double ExpM1(double x) => Math.ExpM1(x); - // /// + /// // public static double Exp2(double x) => Math.Exp2(x); - // /// + /// // public static double Exp2M1(double x) => Math.Exp2M1(x); - // /// + /// // public static double Exp10(double x) => Math.Exp10(x); - // /// + /// // public static double Exp10M1(double x) => Math.Exp10M1(x); // @@ -672,19 +672,19 @@ public static bool IsPow2(double value) /// public static double ScaleB(double x, int n) => Math.ScaleB(x, n); - // /// + /// // public static double Compound(double x, double n) => Math.Compound(x, n); - // /// + /// // public static double MaxMagnitudeNumber(double x, double y) => Math.MaxMagnitudeNumber(x, y); - // /// + /// // public static double MaxNumber(double x, double y) => Math.MaxNumber(x, y); - // /// + /// // public static double MinMagnitudeNumber(double x, double y) => Math.MinMagnitudeNumber(x, y); - // /// + /// // public static double MinNumber(double x, double y) => Math.MinNumber(x, y); // @@ -716,7 +716,7 @@ public static bool IsPow2(double value) /// static double IIncrementOperators.operator ++(double value) => ++value; - // /// + /// static double IIncrementOperators.operator checked ++(double value) => ++value; // @@ -732,13 +732,13 @@ public static bool IsPow2(double value) /// public static double Log10(double x) => Math.Log10(x); - // /// + /// // public static double LogP1(double x) => Math.LogP1(x); - // /// + /// // public static double Log2P1(double x) => Math.Log2P1(x); - // /// + /// // public static double Log10P1(double x) => Math.Log10P1(x); // @@ -774,7 +774,7 @@ public static bool IsPow2(double value) /// static double IMultiplyOperators.operator *(double left, double right) => left * right; - // /// + /// static double IMultiplyOperators.operator checked *(double left, double right) => left * right; // @@ -1122,13 +1122,13 @@ public static bool TryCreate(TOther value, out double result) /// public static double Cbrt(double x) => Math.Cbrt(x); - // /// + /// // public static double Hypot(double x, double y) => Math.Hypot(x, y); /// public static double Sqrt(double x) => Math.Sqrt(x); - // /// + /// // public static double Root(double x, double n) => Math.Root(x, n); // @@ -1155,7 +1155,7 @@ public static bool TryCreate(TOther value, out double result) /// static double ISubtractionOperators.operator -(double left, double right) => left - right; - // /// + /// static double ISubtractionOperators.operator checked -(double left, double right) => left - right; // @@ -1186,25 +1186,25 @@ public static bool TryCreate(TOther value, out double result) /// public static double Tan(double x) => Math.Tan(x); - // /// + /// // public static double AcosPi(double x) => Math.AcosPi(x); - // /// + /// // public static double AsinPi(double x) => Math.AsinPi(x); - // /// + /// // public static double AtanPi(double x) => Math.AtanPi(x); - // /// + /// // public static double Atan2Pi(double y, double x) => Math.Atan2Pi(y, x); - // /// + /// // public static double CosPi(double x) => Math.CosPi(x); - // /// + /// // public static double SinPi(double x) => Math.SinPi(x, y); - // /// + /// // public static double TanPi(double x) => Math.TanPi(x, y); // @@ -1214,7 +1214,7 @@ public static bool TryCreate(TOther value, out double result) /// static double IUnaryNegationOperators.operator -(double value) => -value; - // /// + /// static double IUnaryNegationOperators.operator checked -(double value) => -value; // diff --git a/src/libraries/System.Private.CoreLib/src/System/Half.cs b/src/libraries/System.Private.CoreLib/src/System/Half.cs index 351607a29057c..51725e94d08a9 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Half.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Half.cs @@ -715,7 +715,7 @@ private static double CreateDoubleNaN(bool sign, ulong significand) /// public static Half operator +(Half left, Half right) => (Half)((float)left + (float)right); - // /// + /// static Half IAdditionOperators.operator checked +(Half left, Half right) => left + right; // @@ -789,7 +789,7 @@ public static bool IsPow2(Half value) return (Half)tmp; } - // /// + /// static Half IDecrementOperators.operator checked --(Half value) => --value; // @@ -799,7 +799,7 @@ public static bool IsPow2(Half value) /// public static Half operator /(Half left, Half right) => (Half)((float)left / (float)right); - // /// + /// static Half IDivisionOperators.operator checked /(Half left, Half right) => left / right; // @@ -809,19 +809,19 @@ public static bool IsPow2(Half value) /// public static Half Exp(Half x) => (Half)MathF.Exp((float)x); - // /// + /// // public static Half ExpM1(Half x) => (Half)MathF.ExpM1((float)x); - // /// + /// // public static Half Exp2(Half x) => (Half)MathF.Exp2((float)x); - // /// + /// // public static Half Exp2M1(Half x) => (Half)MathF.Exp2M1((float)x); - // /// + /// // public static Half Exp10(Half x) => (Half)MathF.Exp10((float)x); - // /// + /// // public static Half Exp10M1(Half x) => (Half)MathF.Exp10M1((float)x); // @@ -889,19 +889,19 @@ public static bool IsPow2(Half value) /// public static Half ScaleB(Half x, int n) => (Half)MathF.ScaleB((float)x, n); - // /// + /// // public static Half Compound(Half x, Half n) => (Half)MathF.Compound((float)x, (float)n); - // /// + /// // public static Half MaxMagnitudeNumber(Half x, Half y) => (Half)MathF.MaxMagnitudeNumber((float)x, (float)y); - // /// + /// // public static Half MaxNumber(Half x, Half y) => (Half)MathF.MaxNumber((float)x, (float)y); - // /// + /// // public static Half MinMagnitudeNumber(Half x, Half y) => (Half)MathF.MinMagnitudeNumber((float)x, (float)y); - // /// + /// // public static Half MinNumber(Half x, Half y) => (Half)MathF.MinNumber((float)x, (float)y); // @@ -938,7 +938,7 @@ public static bool IsPow2(Half value) return (Half)tmp; } - // /// + /// static Half IIncrementOperators.operator checked ++(Half value) => ++value; // @@ -954,13 +954,13 @@ public static bool IsPow2(Half value) /// public static Half Log10(Half x) => (Half)MathF.Log10((float)x); - // /// + /// // public static Half LogP1(Half x) => (Half)MathF.LogP1((float)x); - // /// + /// // public static Half Log2P1(Half x) => (Half)MathF.Log2P1((float)x); - // /// + /// // public static Half Log10P1(Half x) => (Half)MathF.Log10P1((float)x); // @@ -984,7 +984,7 @@ public static bool IsPow2(Half value) /// public static Half operator *(Half left, Half right) => (Half)((float)left * (float)right); - // /// + /// static Half IMultiplyOperators.operator checked *(Half left, Half right) => left * right; // @@ -1332,13 +1332,13 @@ public static bool TryCreate(TOther value, out Half result) /// public static Half Cbrt(Half x) => (Half)MathF.Cbrt((float)x); - // /// + /// // public static Half Hypot(Half x, Half y) => (Half)MathF.Hypot((float)x, (float)y); /// public static Half Sqrt(Half x) => (Half)MathF.Sqrt((float)x); - // /// + /// // public static Half Root(Half x, Half n) => (Half)MathF.Root((float)x, (float)n); // @@ -1365,7 +1365,7 @@ public static bool TryCreate(TOther value, out Half result) /// public static Half operator -(Half left, Half right) => (Half)((float)left - (float)right); - // /// + /// static Half ISubtractionOperators.operator checked -(Half left, Half right) => left - right; // @@ -1400,25 +1400,25 @@ public static (Half Sin, Half Cos) SinCos(Half x) /// public static Half Tan(Half x) => (Half)MathF.Tan((float)x); - // /// + /// // public static Half AcosPi(Half x) => (Half)MathF.AcosPi((float)x); - // /// + /// // public static Half AsinPi(Half x) => (Half)MathF.AsinPi((float)x); - // /// + /// // public static Half AtanPi(Half x) => (Half)MathF.AtanPi((float)x); - // /// + /// // public static Half Atan2Pi(Half y, Half x) => (Half)MathF.Atan2Pi((float)y, (float)x); - // /// + /// // public static Half CosPi(Half x) => (Half)MathF.CosPi((float)x); - // /// + /// // public static Half SinPi(Half x) => (Half)MathF.SinPi((float)x, (float)y); - // /// + /// // public static Half TanPi(Half x) => (Half)MathF.TanPi((float)x, (float)y); // @@ -1428,7 +1428,7 @@ public static (Half Sin, Half Cos) SinCos(Half x) /// public static Half operator -(Half value) => (Half)(-(float)value); - // /// + /// static Half IUnaryNegationOperators.operator checked -(Half value) => -value; // diff --git a/src/libraries/System.Private.CoreLib/src/System/Int16.cs b/src/libraries/System.Private.CoreLib/src/System/Int16.cs index fa7ac4c6960cd..b32af3d22aca8 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int16.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int16.cs @@ -306,7 +306,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static short IAdditionOperators.operator +(short left, short right) => (short)(left + right); - // /// + /// static short IAdditionOperators.operator checked +(short left, short right) => checked((short)(left + right)); // @@ -394,7 +394,7 @@ public static short Log2(short value) /// static short IDecrementOperators.operator --(short value) => --value; - // /// + /// static short IDecrementOperators.operator checked --(short value) => checked(--value); // @@ -404,7 +404,7 @@ public static short Log2(short value) /// static short IDivisionOperators.operator /(short left, short right) => (short)(left / right); - // /// + /// static short IDivisionOperators.operator checked /(short left, short right) => (short)(left / right); // @@ -424,7 +424,7 @@ public static short Log2(short value) /// static short IIncrementOperators.operator ++(short value) => ++value; - // /// + /// static short IIncrementOperators.operator checked ++(short value) => checked(++value); // @@ -458,7 +458,7 @@ public static short Log2(short value) /// static short IMultiplyOperators.operator *(short left, short right) => (short)(left * right); - // /// + /// static short IMultiplyOperators.operator checked *(short left, short right) => checked((short)(left * right)); // @@ -984,7 +984,7 @@ public static bool TryCreate(TOther value, out short result) /// static short IShiftOperators.operator >>(short value, int shiftAmount) => (short)(value >> shiftAmount); - // /// + /// // static short IShiftOperators.operator >>>(short value, int shiftAmount) => (short)((ushort)value >> shiftAmount); // @@ -1011,7 +1011,7 @@ public static bool TryCreate(TOther value, out short result) /// static short ISubtractionOperators.operator -(short left, short right) => (short)(left - right); - // /// + /// static short ISubtractionOperators.operator checked -(short left, short right) => checked((short)(left - right)); // @@ -1021,7 +1021,7 @@ public static bool TryCreate(TOther value, out short result) /// static short IUnaryNegationOperators.operator -(short value) => (short)(-value); - // /// + /// static short IUnaryNegationOperators.operator checked -(short value) => checked((short)(-value)); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Int32.cs b/src/libraries/System.Private.CoreLib/src/System/Int32.cs index c1e518268ef34..b3a56a5eb44d0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int32.cs @@ -298,7 +298,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static int IAdditionOperators.operator +(int left, int right) => left + right; - // /// + /// static int IAdditionOperators.operator checked +(int left, int right) => checked(left + right); // @@ -386,7 +386,7 @@ public static int Log2(int value) /// static int IDecrementOperators.operator --(int value) => --value; - // /// + /// static int IDecrementOperators.operator checked --(int value) => checked(--value); // @@ -396,7 +396,7 @@ public static int Log2(int value) /// static int IDivisionOperators.operator /(int left, int right) => left / right; - // /// + /// static int IDivisionOperators.operator checked /(int left, int right) => left / right; // @@ -416,7 +416,7 @@ public static int Log2(int value) /// static int IIncrementOperators.operator ++(int value) => ++value; - // /// + /// static int IIncrementOperators.operator checked ++(int value) => checked(++value); // @@ -450,7 +450,7 @@ public static int Log2(int value) /// static int IMultiplyOperators.operator *(int left, int right) => left * right; - // /// + /// static int IMultiplyOperators.operator checked *(int left, int right) => checked(left * right); // @@ -948,7 +948,7 @@ public static bool TryCreate(TOther value, out int result) /// static int IShiftOperators.operator >>(int value, int shiftAmount) => value >> shiftAmount; - // /// + /// // static int IShiftOperators.operator >>>(int value, int shiftAmount) => (int)((uint)value >> shiftAmount); // @@ -975,7 +975,7 @@ public static bool TryCreate(TOther value, out int result) /// static int ISubtractionOperators.operator -(int left, int right) => left - right; - // /// + /// static int ISubtractionOperators.operator checked -(int left, int right) => checked(left - right); // @@ -985,7 +985,7 @@ public static bool TryCreate(TOther value, out int result) /// static int IUnaryNegationOperators.operator -(int value) => -value; - // /// + /// static int IUnaryNegationOperators.operator checked -(int value) => checked(-value); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Int64.cs b/src/libraries/System.Private.CoreLib/src/System/Int64.cs index aa2a41dfa39a2..5d0bf4cb35f6e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int64.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int64.cs @@ -285,7 +285,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static long IAdditionOperators.operator +(long left, long right) => left + right; - // /// + /// static long IAdditionOperators.operator checked +(long left, long right) => checked(left + right); // @@ -373,7 +373,7 @@ public static long Log2(long value) /// static long IDecrementOperators.operator --(long value) => --value; - // /// + /// static long IDecrementOperators.operator checked --(long value) => checked(--value); // @@ -383,7 +383,7 @@ public static long Log2(long value) /// static long IDivisionOperators.operator /(long left, long right) => left / right; - // /// + /// static long IDivisionOperators.operator checked /(long left, long right) => left / right; // @@ -403,7 +403,7 @@ public static long Log2(long value) /// static long IIncrementOperators.operator ++(long value) => ++value; - // /// + /// static long IIncrementOperators.operator checked ++(long value) => checked(++value); // @@ -437,7 +437,7 @@ public static long Log2(long value) /// static long IMultiplyOperators.operator *(long left, long right) => left * right; - // /// + /// static long IMultiplyOperators.operator checked *(long left, long right) => checked(left * right); // @@ -906,7 +906,7 @@ public static bool TryCreate(TOther value, out long result) /// static long IShiftOperators.operator >>(long value, int shiftAmount) => value >> (int)shiftAmount; - // /// + /// // static long IShiftOperators.operator >>>(long value, int shiftAmount) => (long)((ulong)value >> (int)shiftAmount); // @@ -933,7 +933,7 @@ public static bool TryCreate(TOther value, out long result) /// static long ISubtractionOperators.operator -(long left, long right) => left - right; - // /// + /// static long ISubtractionOperators.operator checked -(long left, long right) => checked(left - right); // @@ -943,7 +943,7 @@ public static bool TryCreate(TOther value, out long result) /// static long IUnaryNegationOperators.operator -(long value) => -value; - // /// + /// static long IUnaryNegationOperators.operator checked -(long value) => checked(-value); // diff --git a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs index 271017ff1220f..633676005dfd3 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs @@ -270,7 +270,7 @@ public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatPro /// static nint IAdditionOperators.operator +(nint left, nint right) => left + right; - // /// + /// static nint IAdditionOperators.operator checked +(nint left, nint right) => checked(left + right); // @@ -416,7 +416,7 @@ static nint IBinaryNumber.Log2(nint value) /// static nint IDecrementOperators.operator --(nint value) => --value; - // /// + /// static nint IDecrementOperators.operator checked --(nint value) => checked(--value); // @@ -426,7 +426,7 @@ static nint IBinaryNumber.Log2(nint value) /// static nint IDivisionOperators.operator /(nint left, nint right) => left / right; - // /// + /// static nint IDivisionOperators.operator checked /(nint left, nint right) => left / right; // @@ -436,7 +436,7 @@ static nint IBinaryNumber.Log2(nint value) /// static nint IIncrementOperators.operator ++(nint value) => ++value; - // /// + /// static nint IIncrementOperators.operator checked ++(nint value) => checked(++value); // @@ -470,7 +470,7 @@ static nint IBinaryNumber.Log2(nint value) /// static nint IMultiplyOperators.operator *(nint left, nint right) => left * right; - // /// + /// static nint IMultiplyOperators.operator checked *(nint left, nint right) => checked(left * right); // @@ -948,7 +948,7 @@ static bool INumber.TryCreate(TOther value, out nint result) /// static nint IShiftOperators.operator >>(nint value, int shiftAmount) => value >> (int)shiftAmount; - // /// + /// // static nint IShiftOperators.operator >>>(nint value, int shiftAmount) => (nint)((nuint)value >> (int)shiftAmount); // @@ -965,7 +965,7 @@ static bool INumber.TryCreate(TOther value, out nint result) /// static nint ISubtractionOperators.operator -(nint left, nint right) => left - right; - // /// + /// static nint ISubtractionOperators.operator checked -(nint left, nint right) => checked(left - right); // @@ -975,7 +975,7 @@ static bool INumber.TryCreate(TOther value, out nint result) /// static nint IUnaryNegationOperators.operator -(nint value) => -value; - // /// + /// static nint IUnaryNegationOperators.operator checked -(nint value) => checked(-value); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IAdditionOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IAdditionOperators.cs index c2be46cdd06f6..2a23b40648fce 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IAdditionOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IAdditionOperators.cs @@ -16,11 +16,11 @@ public interface IAdditionOperators /// The sum of and . static abstract TResult operator +(TSelf left, TOther right); - // /// Adds two values together to compute their sum. - // /// The value to which is added. - // /// The value which is added to . - // /// The sum of and . - // /// The sum of and is not representable by . + /// Adds two values together to compute their sum. + /// The value to which is added. + /// The value which is added to . + /// The sum of and . + /// The sum of and is not representable by . static abstract TResult operator checked +(TSelf left, TOther right); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecrementOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecrementOperators.cs index dd6d80c3d00be..49ad93519f5c2 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecrementOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IDecrementOperators.cs @@ -13,10 +13,10 @@ public interface IDecrementOperators /// The result of decrementing . static abstract TSelf operator --(TSelf value); - // /// Decrements a value. - // /// The value to decrement. - // /// The result of decrementing . - // /// The result of decrementing is not representable by . + /// Decrements a value. + /// The value to decrement. + /// The result of decrementing . + /// The result of decrementing is not representable by . static abstract TSelf operator checked --(TSelf value); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IDivisionOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IDivisionOperators.cs index 1c65fa17dd031..4c5548920c6da 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IDivisionOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IDivisionOperators.cs @@ -16,11 +16,11 @@ public interface IDivisionOperators /// The quotient of divided-by . static abstract TResult operator /(TSelf left, TOther right); - // /// Divides two values together to compute their quotient. - // /// The value which divides. - // /// The value which divides . - // /// The quotient of divided-by . - // /// The quotient of divided-by is not representable by . + /// Divides two values together to compute their quotient. + /// The value which divides. + /// The value which divides . + /// The quotient of divided-by . + /// The quotient of divided-by is not representable by . static abstract TResult operator checked /(TSelf left, TOther right); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IIncrementOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IIncrementOperators.cs index 538f5c8afe35e..3dd705603e473 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IIncrementOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IIncrementOperators.cs @@ -13,10 +13,10 @@ public interface IIncrementOperators /// The result of incrementing . static abstract TSelf operator ++(TSelf value); - // /// Increments a value. - // /// The value to increment. - // /// The result of incrementing . - // /// The result of incrementing is not representable by . + /// Increments a value. + /// The value to increment. + /// The result of incrementing . + /// The result of incrementing is not representable by . static abstract TSelf operator checked ++(TSelf value); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IMultiplyOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IMultiplyOperators.cs index 1596ab6157fe3..24a2a41470c98 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IMultiplyOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IMultiplyOperators.cs @@ -16,11 +16,11 @@ public interface IMultiplyOperators /// The product of divided-by . static abstract TResult operator *(TSelf left, TOther right); - // /// Multiplies two values together to compute their product. - // /// The value which multiplies. - // /// The value which multiplies . - // /// The product of divided-by . - // /// The product of multiplied-by is not representable by . + /// Multiplies two values together to compute their product. + /// The value which multiplies. + /// The value which multiplies . + /// The product of divided-by . + /// The product of multiplied-by is not representable by . static abstract TResult operator checked *(TSelf left, TOther right); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/ISubtractionOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/ISubtractionOperators.cs index 231a7c7eeb583..38bd5a2b4625f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/ISubtractionOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/ISubtractionOperators.cs @@ -16,11 +16,11 @@ public interface ISubtractionOperators /// The difference of subtracted from . static abstract TResult operator -(TSelf left, TOther right); - // /// Subtracts two values to compute their difference. - // /// The value from which is subtracted. - // /// The value which is subtracted from . - // /// The difference of subtracted from . - // /// The difference of subtracted from is not representable by . + /// Subtracts two values to compute their difference. + /// The value from which is subtracted. + /// The value which is subtracted from . + /// The difference of subtracted from . + /// The difference of subtracted from is not representable by . static abstract TResult operator checked -(TSelf left, TOther right); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/Numerics/IUnaryNegationOperators.cs b/src/libraries/System.Private.CoreLib/src/System/Numerics/IUnaryNegationOperators.cs index affe92350ba85..b03b13d5071e4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Numerics/IUnaryNegationOperators.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Numerics/IUnaryNegationOperators.cs @@ -14,10 +14,10 @@ public interface IUnaryNegationOperators /// The unary negation of . static abstract TResult operator -(TSelf value); - // /// Computes the unary negation of a value. - // /// The value for which to compute its unary negation. - // /// The unary negation of . - // /// The unary negation of is not representable by . + /// Computes the unary negation of a value. + /// The value for which to compute its unary negation. + /// The unary negation of . + /// The unary negation of is not representable by . static abstract TResult operator checked -(TSelf value); } } diff --git a/src/libraries/System.Private.CoreLib/src/System/SByte.cs b/src/libraries/System.Private.CoreLib/src/System/SByte.cs index 2d6670ee6257c..01236a25bf88c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SByte.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SByte.cs @@ -314,7 +314,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static sbyte IAdditionOperators.operator +(sbyte left, sbyte right) => (sbyte)(left + right); - // /// + /// static sbyte IAdditionOperators.operator checked +(sbyte left, sbyte right) => checked((sbyte)(left + right)); // @@ -402,7 +402,7 @@ public static sbyte Log2(sbyte value) /// static sbyte IDecrementOperators.operator --(sbyte value) => --value; - // /// + /// static sbyte IDecrementOperators.operator checked --(sbyte value) => checked(--value); // @@ -412,7 +412,7 @@ public static sbyte Log2(sbyte value) /// static sbyte IDivisionOperators.operator /(sbyte left, sbyte right) => (sbyte)(left / right); - // /// + /// static sbyte IDivisionOperators.operator checked /(sbyte left, sbyte right) => (sbyte)(left / right); // @@ -432,7 +432,7 @@ public static sbyte Log2(sbyte value) /// static sbyte IIncrementOperators.operator ++(sbyte value) => ++value; - // /// + /// static sbyte IIncrementOperators.operator checked ++(sbyte value) => checked(++value); // @@ -466,7 +466,7 @@ public static sbyte Log2(sbyte value) /// static sbyte IMultiplyOperators.operator *(sbyte left, sbyte right) => (sbyte)(left * right); - // /// + /// static sbyte IMultiplyOperators.operator checked *(sbyte left, sbyte right) => checked((sbyte)(left * right)); // @@ -1011,7 +1011,7 @@ public static bool TryCreate(TOther value, out sbyte result) /// static sbyte IShiftOperators.operator >>(sbyte value, int shiftAmount) => (sbyte)(value >> shiftAmount); - // /// + /// // static sbyte IShiftOperators.operator >>>(sbyte value, int shiftAmount) => (sbyte)((byte)value >> shiftAmount); // @@ -1038,7 +1038,7 @@ public static bool TryCreate(TOther value, out sbyte result) /// static sbyte ISubtractionOperators.operator -(sbyte left, sbyte right) => (sbyte)(left - right); - // /// + /// static sbyte ISubtractionOperators.operator checked -(sbyte left, sbyte right) => checked((sbyte)(left - right)); // @@ -1048,7 +1048,7 @@ public static bool TryCreate(TOther value, out sbyte result) /// static sbyte IUnaryNegationOperators.operator -(sbyte value) => (sbyte)(-value); - // /// + /// static sbyte IUnaryNegationOperators.operator checked -(sbyte value) => checked((sbyte)(-value)); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Single.cs b/src/libraries/System.Private.CoreLib/src/System/Single.cs index 7ffa5f775caf8..e02a21ff31a7e 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Single.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Single.cs @@ -486,7 +486,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static float IAdditionOperators.operator +(float left, float right) => left + right; - // /// + /// static float IAdditionOperators.operator checked +(float left, float right) => left + right; // @@ -555,7 +555,7 @@ public static bool IsPow2(float value) /// static float IDecrementOperators.operator --(float value) => --value; - // /// + /// static float IDecrementOperators.operator checked --(float value) => --value; // @@ -565,7 +565,7 @@ public static bool IsPow2(float value) /// static float IDivisionOperators.operator /(float left, float right) => left / right; - // /// + /// static float IDivisionOperators.operator checked /(float left, float right) => left / right; // @@ -575,19 +575,19 @@ public static bool IsPow2(float value) /// public static float Exp(float x) => MathF.Exp(x); - // /// + /// // public static float ExpM1(float x) => MathF.ExpM1(x); - // /// + /// // public static float Exp2(float x) => MathF.Exp2(x); - // /// + /// // public static float Exp2M1(float x) => MathF.Exp2M1(x); - // /// + /// // public static float Exp10(float x) => MathF.Exp10(x); - // /// + /// // public static float Exp10M1(float x) => MathF.Exp10M1(x); // @@ -667,19 +667,19 @@ public static bool IsPow2(float value) /// public static float ScaleB(float x, int n) => MathF.ScaleB(x, n); - // /// + /// // public static float Compound(float x, float n) => MathF.Compound(x, n); - // /// + /// // public static float MaxMagnitudeNumber(float x, float y) => MathF.MaxMagnitudeNumber(x, y); - // /// + /// // public static float MaxNumber(float x, float y) => MathF.MaxNumber(x, y); - // /// + /// // public static float MinMagnitudeNumber(float x, float y) => MathF.MinMagnitudeNumber(x, y); - // /// + /// // public static float MinNumber(float x, float y) => MathF.MinNumber(x, y); // @@ -711,7 +711,7 @@ public static bool IsPow2(float value) /// static float IIncrementOperators.operator ++(float value) => ++value; - // /// + /// static float IIncrementOperators.operator checked ++(float value) => ++value; // @@ -727,13 +727,13 @@ public static bool IsPow2(float value) /// public static float Log10(float x) => MathF.Log10(x); - // /// + /// // public static float LogP1(float x) => MathF.LogP1(x); - // /// + /// // public static float Log2P1(float x) => MathF.Log2P1(x); - // /// + /// // public static float Log10P1(float x) => MathF.Log10P1(x); // @@ -769,7 +769,7 @@ public static bool IsPow2(float value) /// static float IMultiplyOperators.operator *(float left, float right) => left * right; - // /// + /// static float IMultiplyOperators.operator checked *(float left, float right) => left * right; // @@ -1117,13 +1117,13 @@ public static bool TryCreate(TOther value, out float result) /// public static float Cbrt(float x) => MathF.Cbrt(x); - // /// + /// // public static float Hypot(float x, float y) => MathF.Hypot(x, y); /// public static float Sqrt(float x) => MathF.Sqrt(x); - // /// + /// // public static float Root(float x, float n) => MathF.Root(x, n); // @@ -1150,7 +1150,7 @@ public static bool TryCreate(TOther value, out float result) /// static float ISubtractionOperators.operator -(float left, float right) => left - right; - // /// + /// static float ISubtractionOperators.operator checked -(float left, float right) => left - right; // @@ -1181,25 +1181,25 @@ public static bool TryCreate(TOther value, out float result) /// public static float Tan(float x) => MathF.Tan(x); - // /// + /// // public static float AcosPi(float x) => MathF.AcosPi(x); - // /// + /// // public static float AsinPi(float x) => MathF.AsinPi(x); - // /// + /// // public static float AtanPi(float x) => MathF.AtanPi(x); - // /// + /// // public static float Atan2Pi(float y, float x) => MathF.Atan2Pi(y, x); - // /// + /// // public static float CosPi(float x) => MathF.CosPi(x); - // /// + /// // public static float SinPi(float x) => MathF.SinPi(x, y); - // /// + /// // public static float TanPi(float x) => MathF.TanPi(x, y); // @@ -1209,7 +1209,7 @@ public static bool TryCreate(TOther value, out float result) /// static float IUnaryNegationOperators.operator -(float value) => -value; - // /// + /// static float IUnaryNegationOperators.operator checked -(float value) => -value; // diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs b/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs index 2c80da097a9a5..2090dd76c69ec 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeOnly.cs @@ -937,7 +937,7 @@ public string ToString([StringSyntax(StringSyntaxAttribute.TimeOnlyFormat)] stri // ISubtractionOperators // - // /// + /// static TimeSpan ISubtractionOperators.operator checked -(TimeOnly left, TimeOnly right) => left - right; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/TimeSpan.cs b/src/libraries/System.Private.CoreLib/src/System/TimeSpan.cs index e45c2b3d10540..4a461ee74fa8d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/TimeSpan.cs +++ b/src/libraries/System.Private.CoreLib/src/System/TimeSpan.cs @@ -519,7 +519,7 @@ public bool TryFormat(Span destination, out int charsWritten, [StringSynta // IAdditionOperators // - // /// + /// static TimeSpan IAdditionOperators.operator checked +(TimeSpan left, TimeSpan right) => left + right; // @@ -533,10 +533,10 @@ public bool TryFormat(Span destination, out int charsWritten, [StringSynta // IDivisionOperators // - // /// + /// static TimeSpan IDivisionOperators.operator checked /(TimeSpan left, double right) => left / right; - // /// + /// static double IDivisionOperators.operator checked /(TimeSpan left, TimeSpan right) => left / right; // @@ -558,21 +558,21 @@ public bool TryFormat(Span destination, out int charsWritten, [StringSynta // IMultiplyOperators // - // /// + /// static TimeSpan IMultiplyOperators.operator checked *(TimeSpan left, double right) => left * right; // // ISubtractionOperators // - // /// + /// static TimeSpan ISubtractionOperators.operator checked -(TimeSpan left, TimeSpan right) => left - right; // // IUnaryNegationOperators // - // /// + /// static TimeSpan IUnaryNegationOperators.operator checked -(TimeSpan value) => -value; } } diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt16.cs b/src/libraries/System.Private.CoreLib/src/System/UInt16.cs index 97a4afa663d03..949f2e2ceade6 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt16.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt16.cs @@ -294,7 +294,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static ushort IAdditionOperators.operator +(ushort left, ushort right) => (ushort)(left + right); - // /// + /// static ushort IAdditionOperators.operator checked +(ushort left, ushort right) => checked((ushort)(left + right)); // @@ -375,7 +375,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static ushort IDecrementOperators.operator --(ushort value) => --value; - // /// + /// static ushort IDecrementOperators.operator checked --(ushort value) => checked(--value); // @@ -385,7 +385,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static ushort IDivisionOperators.operator /(ushort left, ushort right) => (ushort)(left / right); - // /// + /// static ushort IDivisionOperators.operator checked /(ushort left, ushort right) => (ushort)(left / right); // @@ -405,7 +405,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static ushort IIncrementOperators.operator ++(ushort value) => ++value; - // /// + /// static ushort IIncrementOperators.operator checked ++(ushort value) => checked(++value); // @@ -439,7 +439,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static ushort IMultiplyOperators.operator *(ushort left, ushort right) => (ushort)(left * right); - // /// + /// static ushort IMultiplyOperators.operator checked *(ushort left, ushort right) => checked((ushort)(left * right)); // @@ -891,7 +891,7 @@ public static bool TryCreate(TOther value, out ushort result) /// static ushort IShiftOperators.operator >>(ushort value, int shiftAmount) => (ushort)(value >> shiftAmount); - // /// + /// // static ushort IShiftOperators.operator >>>(ushort value, int shiftAmount) => (ushort)(value >> shiftAmount); // @@ -911,7 +911,7 @@ public static bool TryCreate(TOther value, out ushort result) /// static ushort ISubtractionOperators.operator -(ushort left, ushort right) => (ushort)(left - right); - // /// + /// static ushort ISubtractionOperators.operator checked -(ushort left, ushort right) => checked((ushort)(left - right)); // @@ -921,7 +921,7 @@ public static bool TryCreate(TOther value, out ushort result) /// static ushort IUnaryNegationOperators.operator -(ushort value) => (ushort)(-value); - // /// + /// static ushort IUnaryNegationOperators.operator checked -(ushort value) => checked((ushort)(-value)); // diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt32.cs b/src/libraries/System.Private.CoreLib/src/System/UInt32.cs index 17f6e898b317a..ea3abbe1bf8b1 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt32.cs @@ -280,7 +280,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static uint IAdditionOperators.operator +(uint left, uint right) => left + right; - // /// + /// static uint IAdditionOperators.operator checked +(uint left, uint right) => checked(left + right); // @@ -361,7 +361,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static uint IDecrementOperators.operator --(uint value) => --value; - // /// + /// static uint IDecrementOperators.operator checked --(uint value) => checked(--value); // @@ -371,7 +371,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static uint IDivisionOperators.operator /(uint left, uint right) => left / right; - // /// + /// static uint IDivisionOperators.operator checked /(uint left, uint right) => left / right; // @@ -391,7 +391,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static uint IIncrementOperators.operator ++(uint value) => ++value; - // /// + /// static uint IIncrementOperators.operator checked ++(uint value) => checked(++value); // @@ -425,7 +425,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static uint IMultiplyOperators.operator *(uint left, uint right) => left * right; - // /// + /// static uint IMultiplyOperators.operator checked *(uint left, uint right) => checked(left * right); // @@ -867,7 +867,7 @@ public static bool TryCreate(TOther value, out uint result) /// static uint IShiftOperators.operator >>(uint value, int shiftAmount) => value >> (int)shiftAmount; - // /// + /// // static uint IShiftOperators.operator >>>(uint value, int shiftAmount) => value >> (int)shiftAmount; // @@ -887,7 +887,7 @@ public static bool TryCreate(TOther value, out uint result) /// static uint ISubtractionOperators.operator -(uint left, uint right) => left - right; - // /// + /// static uint ISubtractionOperators.operator checked -(uint left, uint right) => checked(left - right); // @@ -897,7 +897,7 @@ public static bool TryCreate(TOther value, out uint result) /// static uint IUnaryNegationOperators.operator -(uint value) => 0u - value; - // /// + /// static uint IUnaryNegationOperators.operator checked -(uint value) => checked(0u - value); // diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt64.cs b/src/libraries/System.Private.CoreLib/src/System/UInt64.cs index e1565e833467c..e14f3ed50ccdc 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt64.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt64.cs @@ -279,7 +279,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static ulong IAdditionOperators.operator +(ulong left, ulong right) => left + right; - // /// + /// static ulong IAdditionOperators.operator checked +(ulong left, ulong right) => checked(left + right); // @@ -360,7 +360,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static ulong IDecrementOperators.operator --(ulong value) => --value; - // /// + /// static ulong IDecrementOperators.operator checked --(ulong value) => checked(--value); // @@ -370,7 +370,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static ulong IDivisionOperators.operator /(ulong left, ulong right) => left / right; - // /// + /// static ulong IDivisionOperators.operator checked /(ulong left, ulong right) => left / right; // @@ -390,7 +390,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static ulong IIncrementOperators.operator ++(ulong value) => ++value; - // /// + /// static ulong IIncrementOperators.operator checked ++(ulong value) => checked(++value); // @@ -424,7 +424,7 @@ object IConvertible.ToType(Type type, IFormatProvider? provider) /// static ulong IMultiplyOperators.operator *(ulong left, ulong right) => left * right; - // /// + /// static ulong IMultiplyOperators.operator checked *(ulong left, ulong right) => checked(left * right); // @@ -846,7 +846,7 @@ public static bool TryCreate(TOther value, out ulong result) /// static ulong IShiftOperators.operator >>(ulong value, int shiftAmount) => value >> (int)shiftAmount; - // /// + /// // static ulong IShiftOperators.operator >>>(ulong value, int shiftAmount) => value >> (int)shiftAmount; // @@ -866,7 +866,7 @@ public static bool TryCreate(TOther value, out ulong result) /// static ulong ISubtractionOperators.operator -(ulong left, ulong right) => left - right; - // /// + /// static ulong ISubtractionOperators.operator checked -(ulong left, ulong right) => checked(left - right); // @@ -876,7 +876,7 @@ public static bool TryCreate(TOther value, out ulong result) /// static ulong IUnaryNegationOperators.operator -(ulong value) => 0UL - value; - // /// + /// static ulong IUnaryNegationOperators.operator checked -(ulong value) => checked(0UL - value); // diff --git a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs index 5c55066d981d5..a5d50d89fc921 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs @@ -262,7 +262,7 @@ public static bool TryParse(ReadOnlySpan s, NumberStyles style, IFormatPro /// static nuint IAdditionOperators.operator +(nuint left, nuint right) => (nuint)(left + right); - // /// + /// static nuint IAdditionOperators.operator checked +(nuint left, nuint right) => checked((nuint)(left + right)); // @@ -413,7 +413,7 @@ static nuint IBinaryNumber.Log2(nuint value) /// static nuint IDecrementOperators.operator --(nuint value) => --value; - // /// + /// static nuint IDecrementOperators.operator checked --(nuint value) => checked(--value); // @@ -423,7 +423,7 @@ static nuint IBinaryNumber.Log2(nuint value) /// static nuint IDivisionOperators.operator /(nuint left, nuint right) => left / right; - // /// + /// static nuint IDivisionOperators.operator checked /(nuint left, nuint right) => left / right; // @@ -433,7 +433,7 @@ static nuint IBinaryNumber.Log2(nuint value) /// static nuint IIncrementOperators.operator ++(nuint value) => ++value; - // /// + /// static nuint IIncrementOperators.operator checked ++(nuint value) => checked(++value); // @@ -467,7 +467,7 @@ static nuint IBinaryNumber.Log2(nuint value) /// static nuint IMultiplyOperators.operator *(nuint left, nuint right) => left * right; - // /// + /// static nuint IMultiplyOperators.operator checked *(nuint left, nuint right) => checked(left * right); // @@ -890,7 +890,7 @@ static bool INumber.TryCreate(TOther value, out nuint result) /// static nuint IShiftOperators.operator >>(nuint value, int shiftAmount) => value >> (int)shiftAmount; - // /// + /// // static nuint IShiftOperators.operator >>>(nuint value, int shiftAmount) => value >> (int)shiftAmount; // @@ -900,7 +900,7 @@ static bool INumber.TryCreate(TOther value, out nuint result) /// static nuint ISubtractionOperators.operator -(nuint left, nuint right) => left - right; - // /// + /// static nuint ISubtractionOperators.operator checked -(nuint left, nuint right) => checked(left - right); // @@ -910,7 +910,7 @@ static bool INumber.TryCreate(TOther value, out nuint result) /// static nuint IUnaryNegationOperators.operator -(nuint value) => (nuint)0 - value; - // /// + /// static nuint IUnaryNegationOperators.operator checked -(nuint value) => checked((nuint)0 - value); // From 80b166b29e83e7cb2418e26b4212502a3ecd7eff Mon Sep 17 00:00:00 2001 From: Tanner Gooding Date: Thu, 7 Apr 2022 19:18:02 -0700 Subject: [PATCH 7/7] Fix some doc comments that shouldn't have been uncommented yet --- .../System.Private.CoreLib/src/System/Byte.cs | 2 +- .../System.Private.CoreLib/src/System/Char.cs | 2 +- .../src/System/Double.cs | 44 +++++++++---------- .../System.Private.CoreLib/src/System/Half.cs | 44 +++++++++---------- .../src/System/Int16.cs | 2 +- .../src/System/Int32.cs | 2 +- .../src/System/Int64.cs | 2 +- .../src/System/IntPtr.cs | 2 +- .../src/System/SByte.cs | 2 +- .../src/System/Single.cs | 44 +++++++++---------- .../src/System/UInt16.cs | 2 +- .../src/System/UInt32.cs | 2 +- .../src/System/UInt64.cs | 2 +- .../src/System/UIntPtr.cs | 2 +- 14 files changed, 77 insertions(+), 77 deletions(-) diff --git a/src/libraries/System.Private.CoreLib/src/System/Byte.cs b/src/libraries/System.Private.CoreLib/src/System/Byte.cs index 25058eec9912f..a09f978be8ce0 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Byte.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Byte.cs @@ -917,7 +917,7 @@ public static bool TryCreate(TOther value, out byte result) /// static byte IShiftOperators.operator >>(byte value, int shiftAmount) => (byte)(value >> shiftAmount); - /// + // /// // static byte IShiftOperators.operator >>>(byte value, int shiftAmount) => (byte)(value >> shiftAmount); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Char.cs b/src/libraries/System.Private.CoreLib/src/System/Char.cs index 0a9116994a76f..bef8526bf066d 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Char.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Char.cs @@ -1699,7 +1699,7 @@ static bool INumber.TryParse(ReadOnlySpan s, NumberStyles style, IFo /// static char IShiftOperators.operator >>(char value, int shiftAmount) => (char)(value >> shiftAmount); - /// + // /// // static char IShiftOperators.operator >>>(char value, int shiftAmount) => (char)(value >> shiftAmount); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Double.cs b/src/libraries/System.Private.CoreLib/src/System/Double.cs index 6b6bd94375325..63348c8ba5846 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Double.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Double.cs @@ -580,19 +580,19 @@ public static bool IsPow2(double value) /// public static double Exp(double x) => Math.Exp(x); - /// + // /// // public static double ExpM1(double x) => Math.ExpM1(x); - /// + // /// // public static double Exp2(double x) => Math.Exp2(x); - /// + // /// // public static double Exp2M1(double x) => Math.Exp2M1(x); - /// + // /// // public static double Exp10(double x) => Math.Exp10(x); - /// + // /// // public static double Exp10M1(double x) => Math.Exp10M1(x); // @@ -672,19 +672,19 @@ public static bool IsPow2(double value) /// public static double ScaleB(double x, int n) => Math.ScaleB(x, n); - /// + // /// // public static double Compound(double x, double n) => Math.Compound(x, n); - /// + // /// // public static double MaxMagnitudeNumber(double x, double y) => Math.MaxMagnitudeNumber(x, y); - /// + // /// // public static double MaxNumber(double x, double y) => Math.MaxNumber(x, y); - /// + // /// // public static double MinMagnitudeNumber(double x, double y) => Math.MinMagnitudeNumber(x, y); - /// + // /// // public static double MinNumber(double x, double y) => Math.MinNumber(x, y); // @@ -732,13 +732,13 @@ public static bool IsPow2(double value) /// public static double Log10(double x) => Math.Log10(x); - /// + // /// // public static double LogP1(double x) => Math.LogP1(x); - /// + // /// // public static double Log2P1(double x) => Math.Log2P1(x); - /// + // /// // public static double Log10P1(double x) => Math.Log10P1(x); // @@ -1122,13 +1122,13 @@ public static bool TryCreate(TOther value, out double result) /// public static double Cbrt(double x) => Math.Cbrt(x); - /// + // /// // public static double Hypot(double x, double y) => Math.Hypot(x, y); /// public static double Sqrt(double x) => Math.Sqrt(x); - /// + // /// // public static double Root(double x, double n) => Math.Root(x, n); // @@ -1186,25 +1186,25 @@ public static bool TryCreate(TOther value, out double result) /// public static double Tan(double x) => Math.Tan(x); - /// + // /// // public static double AcosPi(double x) => Math.AcosPi(x); - /// + // /// // public static double AsinPi(double x) => Math.AsinPi(x); - /// + // /// // public static double AtanPi(double x) => Math.AtanPi(x); - /// + // /// // public static double Atan2Pi(double y, double x) => Math.Atan2Pi(y, x); - /// + // /// // public static double CosPi(double x) => Math.CosPi(x); - /// + // /// // public static double SinPi(double x) => Math.SinPi(x, y); - /// + // /// // public static double TanPi(double x) => Math.TanPi(x, y); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Half.cs b/src/libraries/System.Private.CoreLib/src/System/Half.cs index 51725e94d08a9..a51d6b11a23e4 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Half.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Half.cs @@ -809,19 +809,19 @@ public static bool IsPow2(Half value) /// public static Half Exp(Half x) => (Half)MathF.Exp((float)x); - /// + // /// // public static Half ExpM1(Half x) => (Half)MathF.ExpM1((float)x); - /// + // /// // public static Half Exp2(Half x) => (Half)MathF.Exp2((float)x); - /// + // /// // public static Half Exp2M1(Half x) => (Half)MathF.Exp2M1((float)x); - /// + // /// // public static Half Exp10(Half x) => (Half)MathF.Exp10((float)x); - /// + // /// // public static Half Exp10M1(Half x) => (Half)MathF.Exp10M1((float)x); // @@ -889,19 +889,19 @@ public static bool IsPow2(Half value) /// public static Half ScaleB(Half x, int n) => (Half)MathF.ScaleB((float)x, n); - /// + // /// // public static Half Compound(Half x, Half n) => (Half)MathF.Compound((float)x, (float)n); - /// + // /// // public static Half MaxMagnitudeNumber(Half x, Half y) => (Half)MathF.MaxMagnitudeNumber((float)x, (float)y); - /// + // /// // public static Half MaxNumber(Half x, Half y) => (Half)MathF.MaxNumber((float)x, (float)y); - /// + // /// // public static Half MinMagnitudeNumber(Half x, Half y) => (Half)MathF.MinMagnitudeNumber((float)x, (float)y); - /// + // /// // public static Half MinNumber(Half x, Half y) => (Half)MathF.MinNumber((float)x, (float)y); // @@ -954,13 +954,13 @@ public static bool IsPow2(Half value) /// public static Half Log10(Half x) => (Half)MathF.Log10((float)x); - /// + // /// // public static Half LogP1(Half x) => (Half)MathF.LogP1((float)x); - /// + // /// // public static Half Log2P1(Half x) => (Half)MathF.Log2P1((float)x); - /// + // /// // public static Half Log10P1(Half x) => (Half)MathF.Log10P1((float)x); // @@ -1332,13 +1332,13 @@ public static bool TryCreate(TOther value, out Half result) /// public static Half Cbrt(Half x) => (Half)MathF.Cbrt((float)x); - /// + // /// // public static Half Hypot(Half x, Half y) => (Half)MathF.Hypot((float)x, (float)y); /// public static Half Sqrt(Half x) => (Half)MathF.Sqrt((float)x); - /// + // /// // public static Half Root(Half x, Half n) => (Half)MathF.Root((float)x, (float)n); // @@ -1400,25 +1400,25 @@ public static (Half Sin, Half Cos) SinCos(Half x) /// public static Half Tan(Half x) => (Half)MathF.Tan((float)x); - /// + // /// // public static Half AcosPi(Half x) => (Half)MathF.AcosPi((float)x); - /// + // /// // public static Half AsinPi(Half x) => (Half)MathF.AsinPi((float)x); - /// + // /// // public static Half AtanPi(Half x) => (Half)MathF.AtanPi((float)x); - /// + // /// // public static Half Atan2Pi(Half y, Half x) => (Half)MathF.Atan2Pi((float)y, (float)x); - /// + // /// // public static Half CosPi(Half x) => (Half)MathF.CosPi((float)x); - /// + // /// // public static Half SinPi(Half x) => (Half)MathF.SinPi((float)x, (float)y); - /// + // /// // public static Half TanPi(Half x) => (Half)MathF.TanPi((float)x, (float)y); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Int16.cs b/src/libraries/System.Private.CoreLib/src/System/Int16.cs index b32af3d22aca8..041bccb2a7b6c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int16.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int16.cs @@ -984,7 +984,7 @@ public static bool TryCreate(TOther value, out short result) /// static short IShiftOperators.operator >>(short value, int shiftAmount) => (short)(value >> shiftAmount); - /// + // /// // static short IShiftOperators.operator >>>(short value, int shiftAmount) => (short)((ushort)value >> shiftAmount); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Int32.cs b/src/libraries/System.Private.CoreLib/src/System/Int32.cs index b3a56a5eb44d0..4bb0900afe826 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int32.cs @@ -948,7 +948,7 @@ public static bool TryCreate(TOther value, out int result) /// static int IShiftOperators.operator >>(int value, int shiftAmount) => value >> shiftAmount; - /// + // /// // static int IShiftOperators.operator >>>(int value, int shiftAmount) => (int)((uint)value >> shiftAmount); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Int64.cs b/src/libraries/System.Private.CoreLib/src/System/Int64.cs index 5d0bf4cb35f6e..cbd24e046043f 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Int64.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Int64.cs @@ -906,7 +906,7 @@ public static bool TryCreate(TOther value, out long result) /// static long IShiftOperators.operator >>(long value, int shiftAmount) => value >> (int)shiftAmount; - /// + // /// // static long IShiftOperators.operator >>>(long value, int shiftAmount) => (long)((ulong)value >> (int)shiftAmount); // diff --git a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs index 633676005dfd3..6ee443975b90a 100644 --- a/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/System/IntPtr.cs @@ -948,7 +948,7 @@ static bool INumber.TryCreate(TOther value, out nint result) /// static nint IShiftOperators.operator >>(nint value, int shiftAmount) => value >> (int)shiftAmount; - /// + // /// // static nint IShiftOperators.operator >>>(nint value, int shiftAmount) => (nint)((nuint)value >> (int)shiftAmount); // diff --git a/src/libraries/System.Private.CoreLib/src/System/SByte.cs b/src/libraries/System.Private.CoreLib/src/System/SByte.cs index 01236a25bf88c..3f494d2ec1955 100644 --- a/src/libraries/System.Private.CoreLib/src/System/SByte.cs +++ b/src/libraries/System.Private.CoreLib/src/System/SByte.cs @@ -1011,7 +1011,7 @@ public static bool TryCreate(TOther value, out sbyte result) /// static sbyte IShiftOperators.operator >>(sbyte value, int shiftAmount) => (sbyte)(value >> shiftAmount); - /// + // /// // static sbyte IShiftOperators.operator >>>(sbyte value, int shiftAmount) => (sbyte)((byte)value >> shiftAmount); // diff --git a/src/libraries/System.Private.CoreLib/src/System/Single.cs b/src/libraries/System.Private.CoreLib/src/System/Single.cs index e02a21ff31a7e..2b86f9e2d3d18 100644 --- a/src/libraries/System.Private.CoreLib/src/System/Single.cs +++ b/src/libraries/System.Private.CoreLib/src/System/Single.cs @@ -575,19 +575,19 @@ public static bool IsPow2(float value) /// public static float Exp(float x) => MathF.Exp(x); - /// + // /// // public static float ExpM1(float x) => MathF.ExpM1(x); - /// + // /// // public static float Exp2(float x) => MathF.Exp2(x); - /// + // /// // public static float Exp2M1(float x) => MathF.Exp2M1(x); - /// + // /// // public static float Exp10(float x) => MathF.Exp10(x); - /// + // /// // public static float Exp10M1(float x) => MathF.Exp10M1(x); // @@ -667,19 +667,19 @@ public static bool IsPow2(float value) /// public static float ScaleB(float x, int n) => MathF.ScaleB(x, n); - /// + // /// // public static float Compound(float x, float n) => MathF.Compound(x, n); - /// + // /// // public static float MaxMagnitudeNumber(float x, float y) => MathF.MaxMagnitudeNumber(x, y); - /// + // /// // public static float MaxNumber(float x, float y) => MathF.MaxNumber(x, y); - /// + // /// // public static float MinMagnitudeNumber(float x, float y) => MathF.MinMagnitudeNumber(x, y); - /// + // /// // public static float MinNumber(float x, float y) => MathF.MinNumber(x, y); // @@ -727,13 +727,13 @@ public static bool IsPow2(float value) /// public static float Log10(float x) => MathF.Log10(x); - /// + // /// // public static float LogP1(float x) => MathF.LogP1(x); - /// + // /// // public static float Log2P1(float x) => MathF.Log2P1(x); - /// + // /// // public static float Log10P1(float x) => MathF.Log10P1(x); // @@ -1117,13 +1117,13 @@ public static bool TryCreate(TOther value, out float result) /// public static float Cbrt(float x) => MathF.Cbrt(x); - /// + // /// // public static float Hypot(float x, float y) => MathF.Hypot(x, y); /// public static float Sqrt(float x) => MathF.Sqrt(x); - /// + // /// // public static float Root(float x, float n) => MathF.Root(x, n); // @@ -1181,25 +1181,25 @@ public static bool TryCreate(TOther value, out float result) /// public static float Tan(float x) => MathF.Tan(x); - /// + // /// // public static float AcosPi(float x) => MathF.AcosPi(x); - /// + // /// // public static float AsinPi(float x) => MathF.AsinPi(x); - /// + // /// // public static float AtanPi(float x) => MathF.AtanPi(x); - /// + // /// // public static float Atan2Pi(float y, float x) => MathF.Atan2Pi(y, x); - /// + // /// // public static float CosPi(float x) => MathF.CosPi(x); - /// + // /// // public static float SinPi(float x) => MathF.SinPi(x, y); - /// + // /// // public static float TanPi(float x) => MathF.TanPi(x, y); // diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt16.cs b/src/libraries/System.Private.CoreLib/src/System/UInt16.cs index 949f2e2ceade6..bf9a56ba36a78 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt16.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt16.cs @@ -891,7 +891,7 @@ public static bool TryCreate(TOther value, out ushort result) /// static ushort IShiftOperators.operator >>(ushort value, int shiftAmount) => (ushort)(value >> shiftAmount); - /// + // /// // static ushort IShiftOperators.operator >>>(ushort value, int shiftAmount) => (ushort)(value >> shiftAmount); // diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt32.cs b/src/libraries/System.Private.CoreLib/src/System/UInt32.cs index ea3abbe1bf8b1..68bc0cfdbee89 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt32.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt32.cs @@ -867,7 +867,7 @@ public static bool TryCreate(TOther value, out uint result) /// static uint IShiftOperators.operator >>(uint value, int shiftAmount) => value >> (int)shiftAmount; - /// + // /// // static uint IShiftOperators.operator >>>(uint value, int shiftAmount) => value >> (int)shiftAmount; // diff --git a/src/libraries/System.Private.CoreLib/src/System/UInt64.cs b/src/libraries/System.Private.CoreLib/src/System/UInt64.cs index e14f3ed50ccdc..d691d9d017210 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UInt64.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UInt64.cs @@ -846,7 +846,7 @@ public static bool TryCreate(TOther value, out ulong result) /// static ulong IShiftOperators.operator >>(ulong value, int shiftAmount) => value >> (int)shiftAmount; - /// + // /// // static ulong IShiftOperators.operator >>>(ulong value, int shiftAmount) => value >> (int)shiftAmount; // diff --git a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs index a5d50d89fc921..ab12c690a6e1c 100644 --- a/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs +++ b/src/libraries/System.Private.CoreLib/src/System/UIntPtr.cs @@ -890,7 +890,7 @@ static bool INumber.TryCreate(TOther value, out nuint result) /// static nuint IShiftOperators.operator >>(nuint value, int shiftAmount) => value >> (int)shiftAmount; - /// + // /// // static nuint IShiftOperators.operator >>>(nuint value, int shiftAmount) => value >> (int)shiftAmount; //