c# - Can we use multiple parameter when we pass the argument by reference -


i'm new programming. wanna ask whether can use key word "ref" when there multiple parameters?

static int calc(ref int x, int y) {       return x*y; } static void main(string[] args) {       int num=2;       int multi=calc(ref num, 4);       console.writeline(multi); } 


Comments

Popular posts from this blog

python - Operations inside variables -

Generic Map Parameter java -

arrays - What causes a java.lang.ArrayIndexOutOfBoundsException and how do I prevent it? -