1 class outputsafe
2 {
3 static void Main(string[] args)
4 {
5 IEnumerable<string> data = new string[] { "a", "b" };
6 PrintData(data);
7 }
8 public static void PrintData(IEnumerable<object> o)
9 {
10 foreach (var t in o)
11 {
12 Console.WriteLine(t);
13 }
14 }
15 }
沒有留言:
張貼留言