C Sharp向对象基础.docVIP

  • 3
  • 0
  • 约 13页
  • 2016-10-15 发布于广东
  • 举报
C Sharp向对象基础

C#面向对象基础 1.面向对象简介 using System; using System.Collections.Generic; using System.Linq; using System.Text; namespace C_Sharp面向对象基础 { class Program { static void Main(string[] args) { Person p1 = new Person(); //p1.Name=tom; p1.Height = 180; p1.Age = 30; p1.SayHello(); Person2 p2 = new Person2(); p2.Age = 20; p2.GiveName(tom); p2.SayHello(); Person3 p3=new Person3(); p3.Age=30; //Console.WriteLine(年龄是{0},p3.age);

文档评论(0)

1亿VIP精品文档

相关文档