[C#] named parameter(명명 매개변수)


[C#] named parameter(명명 매개변수)

함수 호출시 매개변수에 이 값이 들어갈 것이다라는 것을 지정해 줄수 있습니다. Colored By Color Scripter 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace named_parameter_test { class Program { static void Main(string[] args) { int a = 1, b = 10; Console.WriteLine(a + " " + b); swap(number1: ref a, number2: ref b); Console.WriteLine(a + " " + b); //swap(number2: ref b, ...


#IT·컴퓨터

원문링크 : [C#] named parameter(명명 매개변수)