Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Specify and test that 0x is case-invariant in the Convert class #101876

Merged
merged 3 commits into from
Jun 12, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 8 additions & 8 deletions src/libraries/System.Private.CoreLib/src/System/Convert.cs
Original file line number Diff line number Diff line change
Expand Up @@ -2046,7 +2046,7 @@ public static string ToString(DateTime value, IFormatProvider? provider)
//
// Parses value in base base. base can only
// be 2, 8, 10, or 16. If base is 16, the number may be preceded
// by 0x; any other leading or trailing characters cause an error.
// by 0x or 0X; any other leading or trailing characters cause an error.
//
public static byte ToByte(string? value, int fromBase)
{
Expand All @@ -2068,7 +2068,7 @@ public static byte ToByte(string? value, int fromBase)

// Parses value in base fromBase. fromBase can only
// be 2, 8, 10, or 16. If fromBase is 16, the number may be preceded
// by 0x; any other leading or trailing characters cause an error.
// by 0x or 0X; any other leading or trailing characters cause an error.
//
[CLSCompliant(false)]
public static sbyte ToSByte(string? value, int fromBase)
Expand All @@ -2094,7 +2094,7 @@ public static sbyte ToSByte(string? value, int fromBase)

// Parses value in base fromBase. fromBase can only
// be 2, 8, 10, or 16. If fromBase is 16, the number may be preceded
// by 0x; any other leading or trailing characters cause an error.
// by 0x or 0X; any other leading or trailing characters cause an error.
//
public static short ToInt16(string? value, int fromBase)
{
Expand All @@ -2119,7 +2119,7 @@ public static short ToInt16(string? value, int fromBase)

// Parses value in base fromBase. fromBase can only
// be 2, 8, 10, or 16. If fromBase is 16, the number may be preceded
// by 0x; any other leading or trailing characters cause an error.
// by 0x or 0X; any other leading or trailing characters cause an error.
//
[CLSCompliant(false)]
public static ushort ToUInt16(string? value, int fromBase)
Expand All @@ -2142,7 +2142,7 @@ public static ushort ToUInt16(string? value, int fromBase)

// Parses value in base fromBase. fromBase can only
// be 2, 8, 10, or 16. If fromBase is 16, the number may be preceded
// by 0x; any other leading or trailing characters cause an error.
// by 0x or 0X; any other leading or trailing characters cause an error.
//
public static int ToInt32(string? value, int fromBase)
{
Expand All @@ -2157,7 +2157,7 @@ public static int ToInt32(string? value, int fromBase)

// Parses value in base fromBase. fromBase can only
// be 2, 8, 10, or 16. If fromBase is 16, the number may be preceded
// by 0x; any other leading or trailing characters cause an error.
// by 0x or 0X; any other leading or trailing characters cause an error.
//
[CLSCompliant(false)]
public static uint ToUInt32(string? value, int fromBase)
Expand All @@ -2173,7 +2173,7 @@ public static uint ToUInt32(string? value, int fromBase)

// Parses value in base fromBase. fromBase can only
// be 2, 8, 10, or 16. If fromBase is 16, the number may be preceded
// by 0x; any other leading or trailing characters cause an error.
// by 0x or 0X; any other leading or trailing characters cause an error.
//
public static long ToInt64(string? value, int fromBase)
{
Expand All @@ -2188,7 +2188,7 @@ public static long ToInt64(string? value, int fromBase)

// Parses value in base fromBase. fromBase can only
// be 2, 8, 10, or 16. If fromBase is 16, the number may be preceded
// by 0x; any other leading or trailing characters cause an error.
// by 0x or 0X; any other leading or trailing characters cause an error.
//
[CLSCompliant(false)]
public static ulong ToUInt64(string? value, int fromBase)
Expand Down
Loading