C#基礎 out傳值

public void Out(out int a, out int b) {//out相當於return返回值 //可以返回多個值 //拿過來變量名的時候,裏面默認爲空值 a=1; b=2; } static void Main(string[] args) { int a = 0; int b = 1; Program hanshu = new Program(); hanshu.Out(ou
相關文章
相關標籤/搜索