Study Notes (59): C # fast entry - arguments and parameters

Learning immediately: https://edu.csdn.net/course/play/20589/257769?utm_source=blogtoedu

1. If you call a method inside the same class, the class name may be omitted

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

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

2. Where the method declaration, declare a variable parameter list with the same number of parameters separated by commas

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

 

 

 

 

Published 34 original articles · won praise 0 · Views 293

Guess you like

Origin blog.csdn.net/u013162262/article/details/104979955
Recommended