[corlib] Fix a few NSLogWriter issues. (#13799)
[mono-project.git] / mcs / tests / gtest-exmethod-12.cs
blobb8f1cdd354548a7ae635c9be1c06d3197c7770e7
3 using System;
4 using System.Collections.Specialized;
6 class Program
8 public static void Main(string[] args)
10 var chat = new ChatClient();
11 var lines = new StringCollection() { "a", "b", "c" };
12 chat.Say("test", lines);
16 class ChatClient
18 public void Say(string to, string message)
20 Console.WriteLine("{0}: {1}", to, message);
25 static class ChatExtensions
27 public static void Say(this ChatClient chat, string to, StringCollection lines)
29 foreach (string line in lines)
31 chat.Say(to, line);