by
239 12

out parameters simple

Copy Embed Code
<iframe id="embedFrame" style="width:600px; height:300px;"
src="https://www.snip2code.com/Embed/209299/out-parameters-simple?startLine=0"></iframe>
Click on the embed code to copy it into your clipboard Width Height
Leave empty to retrieve all the content Start End
//enter here the actual content of the snippet: //the stuff you want to copy-and-paste wherever you need. public static void main() { int total = 0; int product = 0; calculate(10,20,out total,out product); } public static void calculate(int fn, int sn, out int sum, out int multiply) { sum = fn+sn; product = fn*sn; }
If you want to be updated about similar snippets, Sign in and follow our Channels

blog comments powered by Disqus