Pass By Value

C#/기본기

[C#] Pass by Value와 Pass by Reference

Pass by Value using System; using static System.Console; namespace thistiscsharp { class Calculator { public static int Plus (int a, int b) { Console.WriteLine("Input : {0}, {1}", a, b); int result = a + b; return result; } } class MainApp { public static void Main(string[] args) { int x=3; int y=4; int result = Calculator.Plus(x, y); } } } 서론 호출하는 입장인 MainApp클래스의 x, y = 인수 (Arguments)이고 호출되는 메소..

파워지훈
'Pass By Value' 태그의 글 목록