PageRenderTime 2ms CodeModel.GetById 1ms app.highlight 0ms RepoModel.GetById 0ms app.codeStats 0ms

/Test/keyword_public.cs

http://github.com/fishman/ctags
C# | 21 lines | 16 code | 2 blank | 3 comment | 0 complexity | 7d43809ce44370b0d574c885efbff367 MD5 | raw file
Possible License(s): GPL-2.0
 1// protected_public.cs
 2// Public access
 3using System;
 4class MyClass1 
 5{
 6   public int x; 
 7   public int y;
 8}
 9
10class MyClass2 
11{
12   public static void Main() 
13   {
14      MyClass1 mC = new MyClass1();
15
16      // Direct access to public members:
17      mC.x = 10;
18      mC.y = 15;
19      Console.WriteLine("x = {0}, y = {1}", mC.x, mC.y); 
20   }
21}