下例显示了方法声明和使用情况-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
5.19MB
文件大小:
评论区