diff --git a/src/libraries/System.Linq/src/System.Linq.csproj b/src/libraries/System.Linq/src/System.Linq.csproj index 2568fd99fb6c1..eee54eff87b8a 100644 --- a/src/libraries/System.Linq/src/System.Linq.csproj +++ b/src/libraries/System.Linq/src/System.Linq.csproj @@ -16,9 +16,6 @@ - - Common\System\NotImplemented.cs - diff --git a/src/libraries/System.Linq/src/System/Linq/Enumerable.cs b/src/libraries/System.Linq/src/System/Linq/Enumerable.cs index 49f3905e188d6..191a7c03b0606 100644 --- a/src/libraries/System.Linq/src/System/Linq/Enumerable.cs +++ b/src/libraries/System.Linq/src/System/Linq/Enumerable.cs @@ -139,7 +139,7 @@ IEnumerator IEnumerable.GetEnumerator() void IEnumerator.Reset() { - throw NotImplemented.ByDesign; + throw Error.NotSupported(); } } diff --git a/src/libraries/System.Linq/tests/SelectTests.cs b/src/libraries/System.Linq/tests/SelectTests.cs index b583fb8c476a6..9f5e4457ab4e7 100644 --- a/src/libraries/System.Linq/tests/SelectTests.cs +++ b/src/libraries/System.Linq/tests/SelectTests.cs @@ -658,7 +658,7 @@ public void Select_ResetCalledOnEnumerator_ExceptionThrown() var result = source.Select(selector); var enumerator = result.GetEnumerator(); - Assert.Throws(() => enumerator.Reset()); + Assert.Throws(() => enumerator.Reset()); } } } diff --git a/src/libraries/System.Linq/tests/WhereTests.cs b/src/libraries/System.Linq/tests/WhereTests.cs index cb515c1f373e5..4fde9c7eccbc1 100644 --- a/src/libraries/System.Linq/tests/WhereTests.cs +++ b/src/libraries/System.Linq/tests/WhereTests.cs @@ -831,7 +831,7 @@ public void Select_SourceThrowsOnReset() var enumerator = source.Where(value => true).GetEnumerator(); - Assert.Throws(() => enumerator.Reset()); + Assert.Throws(() => enumerator.Reset()); } [Fact]