研究ノート(59):C#の速いエントリー - 引数とパラメータ

すぐに学ぶ:https://edu.csdn.net/course/play/20589/257769?utm_source=blogtoedu

1.あなたは、同じクラス内のメソッドを呼び出した場合、クラス名は省略することができます

class Program
    {
        static void Main(string[] args)
        {
            Run();
        }

        /// <summary>
        /// 跑的方法
        /// </summary>
        public static void Run()
        {
            Console.WriteLine("跑跑跑");
    }

2.メソッド宣言は、パラメータの同じ番号の変数パラメータリストは、カンマで区切られた宣言します

        public static void Log(string str,int i)
        {
            Console.WriteLine(str);
        }

 

 

 

 

公開された34元の記事 ウォンの賞賛0 ビュー293

おすすめ

転載: blog.csdn.net/u013162262/article/details/104979955