2013年5月4日

29常量成员

摘要: const 常量View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace yuan{ class Program { static void Main(string[] args) { yuan y = new yuan(10); Console.WriteLine("圆周率{0}",yuan.pi); Console.WriteLine("半径... 阅读全文

posted @ 2013-05-04 23:17 杨柳清枫2012 阅读(122) 评论(0) 推荐(0)

28-2静态方法

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace jingtai{ class Program { static void Main(string[] args) { int a = 9098; int b = 231; int sum = jisuan.Add(a,b); int dif = jisuan.Sub(a, b); ... 阅读全文

posted @ 2013-05-04 22:47 杨柳清枫2012 阅读(137) 评论(0) 推荐(0)

28-1 以对象为成员

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace gonggu{ class Program { static void Main(string[] args) { Data birthday = new Data(1988,2,1,new Time(17,30,50)); Console.WriteLine("我的生日是{0}年{1}月{2}日{3}",birthday.yea... 阅读全文

posted @ 2013-05-04 22:22 杨柳清枫2012 阅读(143) 评论(0) 推荐(0)

类的巩固练习

摘要: using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace gonggu{ class Time { private int hour; private int minute; private int second; private void SetTime(int h,int m,int s) { Hour = h; Minute = m; ... 阅读全文

posted @ 2013-05-04 20:35 杨柳清枫2012 阅读(114) 评论(0) 推荐(0)

导航