下例显示了方法声明和使用情况-C#.NET讲解

下例显示了方法声明和使用情况: using System; class Test { public int max(int x,int y) { if(x>y) return x; else return y; } public void Main() { Console.WriteLine(“the max of 6 and 8 is:{0}”,max(6,8)); } }程序的输出是the max of 6 and 8 is:8
ppt 文件大小:5.19MB