C# 第七天

199 阅读1分钟
数组方法
    Array.Sort()排序
    
    Array.Reverse() 
函数
函数的语法:
        [public] static 返回值类型  方法名([参数列表])
        {
            方法体;
        }
        
        public :访问修饰符,公开的公共的,奶都可以访问。
        static :静态的
        
        
        public static int GetMax(int n1, int n2)
        {
            return n1 >n2 ? n1 : n2;
        }
        
        returncontinuebreak