示例#1
0
文件: Program.cs 项目: CAHbl4/csharp
 static void Main(string[] args)
 {
     Human ivanov = new Human();
     System.Console.WriteLine(Human.NoseCount);
     //Human.Color = "red";
     Human petrov = new Human("Вася");
     ivanov.Name = 2.ToString();
     Console.WriteLine(ivanov.Name);
     Console.WriteLine(ivanov+" \n "+petrov);
     //petrov.EarsCount = 3;
     //petrov.name = "DFGFD";
     petrov.SetName();
     //Show(age:12);
     //int a=6;
     //PlusFive(ref a);
     //Console.WriteLine("a="+a);
     //int? c=0;
     //Change(a, out c);
     //Console.WriteLine(c);
     ChangeHuman(petrov);
     Console.WriteLine(petrov);
     Human h=null;
     Console.WriteLine(h);
     //c = null;
     //c = 2 * 3;
     Console.ReadKey();
 }
示例#2
0
文件: Program.cs 项目: CAHbl4/csharp
 static void ChangeHuman(Human man)
 {
     man.SetName("Кузя");
 }