do not check order sequence if option /order was not used
[mono.git] / mcs / tests / test-anon-105.cs
1 using System;
2 using System.Collections.Generic;
3
4 public delegate void Hello ();
5
6 struct Foo
7 {
8         public int ID;
9
10         public Foo (int id)
11         {
12                 this.ID = id;
13         }
14
15         public IEnumerable<Foo> Test (Foo foo)
16         {
17                 yield return this;
18                 yield return foo;
19         }
20
21         public void Hello (int value)
22         {
23                 if (ID != value)
24                         throw new InvalidOperationException ();
25         }
26
27         public override string ToString ()
28         {
29                 return String.Format ("Foo ({0})", ID);
30         }
31 }
32
33 class X
34 {
35         static void Main ()
36         {
37                 Foo foo = new Foo (3);
38                 foreach (Foo bar in foo.Test (new Foo (8)))
39                         Console.WriteLine (bar);
40         }
41 }