[mcs] C#7 out variable declaration
[mono.git] / mcs / errors / cs1954.cs
1 // CS1954:  The best overloaded collection initalizer method `Data.Add(ref int)' cannot have `ref' or `out' modifier
2 // Line: 20
3
4 using System;
5 using System.Collections;
6
7 class Data : IEnumerable
8 {
9         public IEnumerator GetEnumerator () { return null; }
10         
11         public void Add (ref int b)
12         {
13         }
14 }
15
16 public class Test
17 {
18         static void Main ()
19         {
20                 var c = new Data { 1 };
21         }
22 }