Beispiel #1
0
        static void Main(string[] args)
        {
            TyrFor();
            //////Console.WriteLine("Hello Worls");
            //////bool isTrue = true;
            //////isTrue = false;
            ////int a = 10;
            ////decimal b = a;
            //////int c = Convert.ToInt32(b); //konwersja, może być też rzutowanie
            //////int c = int.Parse(b.ToString());
            ////int c = 1;
            ////string d = "Roman";

            ////int e = a / c;
            //////a++; inkrementacje
            //////++a;
            /////
            Person roman = new Person();

            roman.Name      = "Roman";
            roman.LastName  = "Nowak";
            roman.BirthDate = 2000;
            object o    = new object();
            var    anna = roman;

            if (anna.Equals(roman))
            {
                Console.WriteLine("ok");
            }
            anna.Name = "Anna";

            //dynamic x = 45.5m;
            //x = "Imie";
            //x = 10;
            //x = true;
            //Console.WriteLine(x);
            ////int c = 10;
            ////int d = c;
            ////Console.WriteLine(c);
            ////Console.WriteLine(d);

            Console.WriteLine(roman.Name);
            Console.WriteLine(roman.LastName);
            Console.WriteLine(roman.GetAge());

            Console.WriteLine(anna.Name);
            Console.WriteLine(anna.LastName);
            Console.WriteLine(anna.GetAge());
            Console.ReadLine();
        }
Beispiel #2
0
        static void Main(string[] args)
        {
            // Console.WriteLine("hello world");
            //bool isTrue = true;
            //isTrue = false;
            //int a = 10;
            //decimal b = 10;
            //float c = 0;
            //string d = "Roman";
            //var e = c / a;

            Person roman = new Person();

            roman.Name      = "Roman";
            roman.LastName  = "Nowak";
            roman.BirthDate = 2000;

            var anna = roman;

            anna.Name = "Anna";
            //dynamic x = 45.5m;
            //x = "Imie";
            //x = 10;
            //x = true;

            //int c = 10;
            //int d = c;
            //d = 5;

            TyrFor();

            Console.WriteLine(c);
            Console.WriteLine(d);

            Console.WriteLine(roman.Name);
            Console.WriteLine(roman.LastName);
            Console.WriteLine(roman.GetAge());

            Console.WriteLine(anna.Name);
            Console.WriteLine(anna.LastName);
            Console.WriteLine(anna.GetAge());

            Console.ReadLine();
        }