diff options
Diffstat (limited to 'mcs/class/referencesource')
-rw-r--r-- | mcs/class/referencesource/mscorlib/system/string.cs | 11 |
1 files changed, 1 insertions, 10 deletions
diff --git a/mcs/class/referencesource/mscorlib/system/string.cs b/mcs/class/referencesource/mscorlib/system/string.cs index 79e71f969cd..4f1214b31d4 100644 --- a/mcs/class/referencesource/mscorlib/system/string.cs +++ b/mcs/class/referencesource/mscorlib/system/string.cs @@ -668,20 +668,11 @@ namespace System { return !String.Equals(a, b); } +#if !MONO // Gets the character at a specified position. // // Spec#: Apply the precondition here using a contract assembly. Potential perf issue. [System.Runtime.CompilerServices.IndexerName("Chars")] -#if MONO - public unsafe char this[int index] { - get { - if (index < 0 || index >= m_stringLength) - throw new IndexOutOfRangeException (); - fixed (char* c = &m_firstChar) - return c[index]; - } - } -#else public extern char this[int index] { [ResourceExposure(ResourceScope.None)] [MethodImpl(MethodImplOptions.InternalCall)] |