Advertisement
Guest User

Untitled

a guest
Jan 20th, 2020
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C# 0.68 KB | None | 0 0
  1. using System;
  2. using System.Collections.Generic;
  3. using System.Linq;
  4. using System.Text;
  5. using System.Threading.Tasks;
  6.  
  7. namespace ConsoleApp1
  8. {
  9.     class Program
  10.     {
  11.         static void Main(string[] args)
  12.         {
  13.             int iVariableNonInit;
  14.  
  15.             Getter(out iVariableNonInit);
  16.             Console.WriteLine(iVariableNonInit);
  17.             Ajouter10(ref iVariableNonInit);
  18.             Console.WriteLine(iVariableNonInit);
  19.  
  20.             Console.ReadLine();
  21.  
  22.         }
  23.  
  24.         public static void Getter (out int a)
  25.         {
  26.             a = 10;
  27.         }
  28.  
  29.         public static void Ajouter10(ref int a)
  30.         {
  31.             a += 20;
  32.         }
  33.     }
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement