Skip to content
This repository was archived by the owner on Jan 23, 2023. It is now read-only.

Commit c752add

Browse files
jkotassafern
authored andcommitted
Cosmetic fixes after move to shared partition
Signed-off-by: dotnet-bot <dotnet-bot@microsoft.com> Signed-off-by: dotnet-bot-corefx-mirror <dotnet-bot@microsoft.com>
1 parent 7f41810 commit c752add

File tree

4 files changed

+10
-10
lines changed

4 files changed

+10
-10
lines changed

src/Common/src/CoreLib/System/ArraySegment.cs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,7 @@ public T this[int index]
7171
{
7272
if ((uint)index >= (uint)_count)
7373
{
74-
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
74+
ThrowHelper.ThrowArgumentOutOfRange_IndexException();
7575
}
7676

7777
return _array[_offset + index];
@@ -80,7 +80,7 @@ public T this[int index]
8080
{
8181
if ((uint)index >= (uint)_count)
8282
{
83-
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
83+
ThrowHelper.ThrowArgumentOutOfRange_IndexException();
8484
}
8585

8686
_array[_offset + index] = value;
@@ -150,7 +150,7 @@ public ArraySegment<T> Slice(int index)
150150

151151
if ((uint)index > (uint)_count)
152152
{
153-
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
153+
ThrowHelper.ThrowArgumentOutOfRange_IndexException();
154154
}
155155

156156
return new ArraySegment<T>(_array, _offset + index, _count - index);
@@ -162,7 +162,7 @@ public ArraySegment<T> Slice(int index, int count)
162162

163163
if ((uint)index > (uint)_count || (uint)count > (uint)(_count - index))
164164
{
165-
ThrowHelper.ThrowArgumentOutOfRangeException(ExceptionArgument.index);
165+
ThrowHelper.ThrowArgumentOutOfRange_IndexException();
166166
}
167167

168168
return new ArraySegment<T>(_array, _offset + index, count);

src/Common/src/CoreLib/System/Empty.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -17,9 +17,9 @@ private Empty()
1717

1818
public static readonly Empty Value = new Empty();
1919

20-
public override String ToString()
20+
public override string ToString()
2121
{
22-
return String.Empty;
22+
return string.Empty;
2323
}
2424
}
2525
}

src/Common/src/CoreLib/System/IntPtr.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -222,12 +222,12 @@ public static int Size
222222
return _value;
223223
}
224224

225-
public unsafe override String ToString()
225+
public unsafe override string ToString()
226226
{
227227
return ((nint)_value).ToString(CultureInfo.InvariantCulture);
228228
}
229229

230-
public unsafe String ToString(String format)
230+
public unsafe string ToString(string format)
231231
{
232232
return ((nint)_value).ToString(format, CultureInfo.InvariantCulture);
233233
}

src/Common/src/CoreLib/System/UIntPtr.cs

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,7 @@ unsafe void ISerializable.GetObjectData(SerializationInfo info, StreamingContext
6565
if (info == null)
6666
throw new ArgumentNullException(nameof(info));
6767

68-
info.AddValue("value", (ulong)_value);
68+
info.AddValue("value", ToUInt64());
6969
}
7070

7171
public unsafe override bool Equals(Object obj)
@@ -213,7 +213,7 @@ public static unsafe int Size
213213
return _value;
214214
}
215215

216-
public unsafe override String ToString()
216+
public unsafe override string ToString()
217217
{
218218
return ((nuint)_value).ToString(CultureInfo.InvariantCulture);
219219
}

0 commit comments

Comments
 (0)