From 51f7c4f6a015666794dc46ec080c80813d4ac57e Mon Sep 17 00:00:00 2001 From: Jo Pearce Date: Mon, 12 Oct 2015 14:07:56 +0100 Subject: Fixed the custom indexer example (setter return type is void) --- csharp.html.markdown | 4 ++-- 1 file 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; } } -- cgit v1.2.3