2003-04-29 Atsushi Enomoto <ginga@kit.hi-ho.ne.jp>
[mono.git] / mcs / errors / cs0027.cs
1 // cs0027.cs: Keyword 'this' can't be used outside a constructor, a method or a property.
2 // Line: 7 
3
4 using System;
5
6 class Error0027 {
7         int i = this.x;
8         int x = 0;
9         
10         public static void Main () {
11                 Console.WriteLine ("The compiler should complain: Error CS0027 trying to use 'this' outside context.");
12                 Console.WriteLine ("Trying to assign i to 'this.x' outside a method, property or ctr.");
13         }
14 }
15