AddO1f

LabSh1

May 18th, 2016
178
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.39 KB | None | 0 0
  1. using System;
  2.  
  3. namespace Prov
  4. {
  5.     class A
  6.     {
  7.         int a = 8;
  8.         int b = 5;
  9.         public int c
  10.         {
  11.             get { a = a + a; --b; return a - b; }
  12.             set { c = value; }
  13.         }
  14.     }
  15.     class programm
  16.     {
  17.         public static void Main()
  18.         {
  19.             A myA = new A();
  20.             Console.WriteLine("{0}", myA.c);
  21.         }
  22.     }
  23. }
Advertisement
Add Comment
Please, Sign In to add comment