Где находится реализация интерфейсов в NET - C#
Формулировка задачи:
Например класса String
Решение задачи: «Где находится реализация интерфейсов в NET»
textual
Листинг программы
[TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")] public int IndexOf(char value) { return this.IndexOf(value, 0, this.Length); } public int IndexOf(string value) { return this.IndexOf(value, StringComparison.CurrentCulture); } [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")] public int IndexOf(char value, int startIndex) { return this.IndexOf(value, startIndex, this.Length - startIndex); } public int IndexOf(string value, int startIndex) { return this.IndexOf(value, startIndex, StringComparison.CurrentCulture); } [SecuritySafeCritical, TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")] public int IndexOf(string value, StringComparison comparisonType) { return this.IndexOf(value, 0, this.Length, comparisonType); } [MethodImpl(MethodImplOptions.InternalCall), SecuritySafeCritical] public extern int IndexOf(char value, int startIndex, int count); public int IndexOf(string value, int startIndex, int count) { if ((startIndex < 0) || (startIndex > this.Length)) { throw new ArgumentOutOfRangeException("startIndex", Environment.GetResourceString("ArgumentOutOfRange_Index")); } if ((count < 0) || (count > (this.Length - startIndex))) { throw new ArgumentOutOfRangeException("count", Environment.GetResourceString("ArgumentOutOfRange_Count")); } return this.IndexOf(value, startIndex, count, StringComparison.CurrentCulture); } [TargetedPatchingOptOut("Performance critical to inline across NGen image boundaries")] public int IndexOf(string value, int startIndex, StringComparison comparisonType) { return this.IndexOf(value, startIndex, this.Length - startIndex, comparisonType); } public int IndexOf(string value, int startIndex, int count, StringComparison comparisonType) { if (value == null) { throw new ArgumentNullException("value"); } if ((startIndex < 0) || (startIndex > this.Length)) { throw new ArgumentOutOfRangeException("startIndex", Environment.GetResourceString("ArgumentOutOfRange_Index")); } if ((count < 0) || (startIndex > (this.Length - count))) { throw new ArgumentOutOfRangeException("count", Environment.GetResourceString("ArgumentOutOfRange_Count")); } switch (comparisonType) { case StringComparison.CurrentCulture: return CultureInfo.CurrentCulture.CompareInfo.IndexOf(this, value, startIndex, count, CompareOptions.None); case StringComparison.CurrentCultureIgnoreCase: return CultureInfo.CurrentCulture.CompareInfo.IndexOf(this, value, startIndex, count, CompareOptions.IgnoreCase); case StringComparison.InvariantCulture: return CultureInfo.InvariantCulture.CompareInfo.IndexOf(this, value, startIndex, count, CompareOptions.None); case StringComparison.InvariantCultureIgnoreCase: return CultureInfo.InvariantCulture.CompareInfo.IndexOf(this, value, startIndex, count, CompareOptions.IgnoreCase); case StringComparison.Ordinal: return CultureInfo.InvariantCulture.CompareInfo.IndexOf(this, value, startIndex, count, CompareOptions.Ordinal); case StringComparison.OrdinalIgnoreCase: return TextInfo.IndexOfStringOrdinalIgnoreCase(this, value, startIndex, count); } throw new ArgumentException(Environment.GetResourceString("NotSupported_StringComparison"), "comparisonType"); }
ИИ поможет Вам:
- решить любую задачу по программированию
- объяснить код
- расставить комментарии в коде
- и т.д