Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Addition of indexer on string

  • Loading branch information...
commit 37775aada3669cd0f67fa9c64f67f2cc375babd9 1 parent 9141c79
@nikhilk authored
View
16 src/Core/CoreLib/String.cs
@@ -36,6 +36,18 @@ public sealed class String {
/// </summary>
/// <param name="index">The specified 0-based position.</param>
/// <returns>The character within the string.</returns>
+ [IntrinsicProperty]
+ public char this[int index] {
+ get {
+ return '\0';
+ }
+ }
+
+ /// <summary>
+ /// Retrieves the character at the specified position.
+ /// </summary>
+ /// <param name="index">The specified 0-based position.</param>
+ /// <returns>The character within the string.</returns>
public char CharAt(int index) {
return '\0';
}
@@ -360,6 +372,10 @@ public sealed class String {
return null;
}
+ public string Substring(int startIndex) {
+ return null;
+ }
+
public string Substring(int startIndex, int endIndex) {
return null;
}
View
7 tests/TestCases/Basic/Metadata/Baseline.txt
@@ -1676,6 +1676,13 @@ Types:
Public: True
Generated Name: String
Global Methods: False
+ Indexer:
+ Indexer: Item
+ AssociatedType: Char
+ Visibility: Public
+ Generated Name: item
+ ReadOnly: True
+ Abstract: False
Members:
Field: Empty
AssociatedType: String
Please sign in to comment.
Something went wrong with that request. Please try again.