Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJustin Van Patten <jvp@justinvp.com>2015-11-28 18:05:39 +0300
committerJustin Van Patten <jvp@justinvp.com>2015-11-28 18:05:39 +0300
commit06cf3e6e24a30b90c2fcf75729252765cd0d67c5 (patch)
treeaf432cb8f69a694680839ac5104f8410dab16596 /src/System.Private.CoreLib
parentb0c745be2118e42a29ab36fde5822105e7c6a659 (diff)
Remove duplicate code in CharEnumerator
Change IEnumerator.Current to simply return Current, instead of having duplicate code in both properties.
Diffstat (limited to 'src/System.Private.CoreLib')
-rw-r--r--src/System.Private.CoreLib/src/System/CharEnumerator.cs10
1 files changed, 1 insertions, 9 deletions
diff --git a/src/System.Private.CoreLib/src/System/CharEnumerator.cs b/src/System.Private.CoreLib/src/System/CharEnumerator.cs
index b11309dd4..1e8b9ee02 100644
--- a/src/System.Private.CoreLib/src/System/CharEnumerator.cs
+++ b/src/System.Private.CoreLib/src/System/CharEnumerator.cs
@@ -55,15 +55,7 @@ namespace System
/// <internalonly/>
Object IEnumerator.Current
{
- get
- {
- if (_index == -1)
- throw new InvalidOperationException(SR.InvalidOperation_EnumNotStarted);
- if (_index >= _str.Length)
- throw new InvalidOperationException(SR.InvalidOperation_EnumEnded);
-
- return _currentElement;
- }
+ get { return Current; }
}
public char Current