Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- using System.Threading.Tasks;
- namespace MW71
- {
- class Program
- {
- private static void SetOut(out int value)
- {
- value = 5;
- }
- private static void SetRef(ref int value)
- {
- value = 6;
- }
- private static void Main(string[] args)
- {
- int valueRef = 0;
- int valueOut;
- SetRef(ref valueRef);
- SetOut(out valueOut);
- Console.WriteLine("REF: " + valueRef);
- Console.WriteLine("OUT: " + valueOut);
- Console.ReadKey();
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement