Add CopyPath, CopyPathFlat, AppendPath
[mono.git] / mcs / tests / gtest-collectioninit-01.cs
1 // Compiler options: -langversion:linq
2 // Tests collection initialization
3 using System;
4 using System.Collections;
5 using System.Collections.Generic;
6
7 public class Test
8 {
9         static int Main ()
10         {
11                 ArrayList collection = new ArrayList { "Foo", "Bar", "Baz" };
12                 foreach (string s in collection)
13                         if (s.Length != 3)
14                                 return 1;
15                 
16                 List<string> generic_collection = new List<string> { "Hello", "World" };
17                 foreach (string s in generic_collection)
18                         if (s.Length != 5)
19                                 return 2;
20                 
21                 return 0;
22         }
23 }