diff options
author | Jo Pearce <jo.pearce@gmail.com> | 2015-10-12 14:07:56 +0100 |
---|---|---|
committer | Jo Pearce <jo.pearce@gmail.com> | 2015-10-12 14:09:53 +0100 |
commit | 51f7c4f6a015666794dc46ec080c80813d4ac57e (patch) | |
tree | 71238ef92685946af1990725754162a85b1b37d9 | |
parent | 1717ee9d881366c069cbb6b3b9eab1a3050d3b4a (diff) |
Fixed the custom indexer example (setter return type is void)
-rw-r--r-- | csharp.html.markdown | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/csharp.html.markdown b/csharp.html.markdown index 479b7f01..72ee3731 100644 --- a/csharp.html.markdown +++ b/csharp.html.markdown @@ -749,7 +749,7 @@ on a new line! ""Wow!"", the masses cried"; // It's also possible to define custom Indexers on objects. // All though this is not entirely useful in this example, you - // could do bicycle[0] which yields "chris" to get the first passenger or + // could do bicycle[0] which returns "chris" to get the first passenger or // bicycle[1] = "lisa" to set the passenger. (of this apparent quattrocycle) private string[] passengers = { "chris", "phil", "darren", "regina" }; @@ -760,7 +760,7 @@ on a new line! ""Wow!"", the masses cried"; } set { - return passengers[i] = value; + passengers[i] = value; } } |