[mcs] C#7 out variable declaration
[mono.git] / mcs / errors / cs0206-2.cs
1 // CS0206: A property, indexer or dynamic member access may not be passed as `ref' or `out' parameter
2 // Line: 22
3
4 using System;
5
6 namespace N
7 {
8         public class Test
9         {
10                 public double this[int i]
11                 {
12                         get { return 1; }
13                 }
14
15                 public static void WriteOutData(out double d)
16                 {
17                         d = 5.0;
18                 }
19
20                 public static void Main(string[] args)
21                 {
22                         Test test = new Test();
23                         WriteOutData(out test[1]);
24                 }
25         }
26 }
27