Пример #1
0
 public Rectangle(string info, int top, int left, int bottom, int right)
 {
     rectInfo = new ShapeInfo(info);
     rectTop = top;
     rectLeft = left;
     rectBottom = bottom;
     rectRight = right;
 }
Пример #2
0
 public Rectangle(string info, int top, int left, int bottom, int right)
 {
     RectInfo   = new ShapeInfo(info);
     RectTop    = top;
     RectBottom = bottom;
     RectLeft   = left;
     RectRight  = right;
 }
Пример #3
0
        static void Main(string[] args)
        {
            Console.WriteLine("***** Values types / Reference types *****\n");
            ValueTypeAssignment();
            Console.WriteLine();

            ReferenceTypeAssignment();
            Console.WriteLine();

            ValueTypeContainingRefType();

            ShapeInfo myShape  = new ShapeInfo("Hello shape");
            ShapeInfo myShape2 = new ShapeInfo();

            Console.WriteLine(myShape.InfoString);
            Console.WriteLine("{0} is empty", myShape2.InfoString);
            Rectangle myRect = new Rectangle();

            Console.WriteLine(myRect.RectTop);

            Console.ReadLine();
        }