Exemple #1
0
        static void Main(string[] args)
        {
            Program.Date Date = new Program.Date();
            Console.WriteLine("Дата создания: {0}", Date.date);

            string str = "Hello world";

            Console.WriteLine(str);
            Console.WriteLine(str.WordMinus(6));
            Vektor one   = new Vektor(1, 2);
            Vektor two   = new Vektor(3, 4);
            Vektor four  = new Vektor(2, 2);
            Vektor three = one + two;

            Console.WriteLine(one > two);
            Console.WriteLine(one < two);
            Console.WriteLine(one == two);
            four.DeletePlus();
            Console.WriteLine("Значения x и y:{0} и {1} ", four.x, four.y);
            Console.WriteLine("Значения x и y:{0} и {1}", two.x, two.y);
            Console.WriteLine("Значение x и y:{0} и {1} ", three.x, three.y);
            Vektor vektor = new Vektor();

            vektor.user.GetInfo();
            Console.ReadKey();
        }
Exemple #2
0
 public static Vektor DeletePlus(this Vektor vektor)
 {
     if (vektor.x > 0)
     {
         vektor.x = 0;
     }
     if (vektor.y > 0)
     {
         vektor.y = 0;
     }
     return(vektor);
 }