close

呼叫/使用:

int x = 1, y = 2, z = 3 ;
F( x );
F( x, y );
F( x, y, z );

定義:

public static void F( params int[] values )
{
  // ...
}

參考:Pass multiple optional parameters to a C# function

arrow
arrow

    Robert 發表在 痞客邦 留言(0) 人氣()