示例#1
0
        static void Main(string[] args)
        {
			CA a = new CA() { Name = "jack hello", Age = 18 };
			CB b = new CB() { First = "kate", Second = "hi", PersonsAge = 21 };

			PrintInfo(a);
			PrintInfo(b);
		}
示例#2
0
        static void Main(string[] args)
        {
			CA a = new CA() { Name = "jack", Age = 18 };
			PrintInfo(a);
		}
示例#3
0
		static void PrintInfo(CA item)
		{
			Console.WriteLine("Name: {0}, Age: {1}", item.Name, item.Age);
		}