Can we use pass by refrence and pass by output together in a method? | Sololearn: Learn to code for FREE!
¡Nuevo curso! ¡Todo programador debería aprender IA Generativa!
Prueba una lección gratuita
0

Can we use pass by refrence and pass by output together in a method?

Like static void Example(ref int a, ref int b, out int sum, out int minus) { sum = a + b; minus = a - b; }

14th Aug 2017, 10:23 AM
Pranav Kushwaha
Pranav Kushwaha - avatar
1 Respuesta
+ 1
Yes you can. You were well one your way, to discover it. If you want to know, test it. C# does give plenty of warnings and errors, a error will not blow up your pc / mobile https://code.sololearn.com/c4i18j7sGa23/#cs
14th Aug 2017, 8:15 PM
sneeze
sneeze - avatar