- 12 Ara 2007
- 849
- 4
[FONT="]using System;[/FONT]
[FONT="]using System.Collections.Generic;[/FONT]
[FONT="]using System.Text;[/FONT]
[FONT="]namespace ConsoleApplication4[/FONT]
[FONT="]{[/FONT]
[FONT="] class Program[/FONT]
[FONT="] {[/FONT]
[FONT="] private int a;[/FONT]
[FONT="] public int A[/FONT]
[FONT="] {[/FONT]
[FONT="] get { return a; }[/FONT]
[FONT="] set { a = value; }[/FONT]
[FONT="] }[/FONT]
[FONT="] static **** Main(string[] args)[/FONT]
[FONT="] {[/FONT]
[FONT="] String a = "a";[/FONT]
[FONT="] String b = "b";[/FONT]
[FONT="] degistir(ref a, ref b);[/FONT]
[FONT="] Console.WriteLine("a=" + a);[/FONT]
[FONT="] Console.WriteLine("b=" + b);[/FONT]
[FONT="] }[/FONT]
[FONT="] static **** degistir(ref String a, ref String b)[/FONT]
[FONT="] {[/FONT]
[FONT="] String c = a;[/FONT]
[FONT="] a = b;[/FONT]
[FONT="] b = c;[/FONT]
[FONT="] }[/FONT]
[FONT="] }[/FONT]
[FONT="]}[/FONT]
[FONT="]using System.Collections.Generic;[/FONT]
[FONT="]using System.Text;[/FONT]
[FONT="]namespace ConsoleApplication4[/FONT]
[FONT="]{[/FONT]
[FONT="] class Program[/FONT]
[FONT="] {[/FONT]
[FONT="] private int a;[/FONT]
[FONT="] public int A[/FONT]
[FONT="] {[/FONT]
[FONT="] get { return a; }[/FONT]
[FONT="] set { a = value; }[/FONT]
[FONT="] }[/FONT]
[FONT="] static **** Main(string[] args)[/FONT]
[FONT="] {[/FONT]
[FONT="] String a = "a";[/FONT]
[FONT="] String b = "b";[/FONT]
[FONT="] degistir(ref a, ref b);[/FONT]
[FONT="] Console.WriteLine("a=" + a);[/FONT]
[FONT="] Console.WriteLine("b=" + b);[/FONT]
[FONT="] }[/FONT]
[FONT="] static **** degistir(ref String a, ref String b)[/FONT]
[FONT="] {[/FONT]
[FONT="] String c = a;[/FONT]
[FONT="] a = b;[/FONT]
[FONT="] b = c;[/FONT]
[FONT="] }[/FONT]
[FONT="] }[/FONT]
[FONT="]}[/FONT]