Method declaration:
public static void SomeMethod(int optional = 0) { }
Method calls:
SomeMethod(); // 0 is used in the method.
SomeMethod(10);
见到以上代码,让我想到了C++,终于可以和C++一样。支持默认值了。
Method declaration:
public static void SomeMethod(int optional = 0) { }
Method calls:
SomeMethod(); // 0 is used in the method.
SomeMethod(10);
见到以上代码,让我想到了C++,终于可以和C++一样。支持默认值了。
相关文章: