using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Threading.Tasks; namespace ConsoleApplication21 { class Program { static void Vymen( ref T a, ref T b) { T pom = a; a = b; b = pom; } static void Main(string[] args) { System.IO.StreamReader sr = new System.IO.StreamReader(@"..\..\Program.cs"); while (!sr.EndOfStream) { string s = sr.ReadLine(); Console.WriteLine(s); } int a = 5; int b = 17; Console.WriteLine("a={0} b={1}",a,b); Vymen(ref a, ref b); Console.WriteLine("a={0} b={1}", a, b); string sa = "pet"; string sb = "sedmnact"; Console.WriteLine("sa={0} sb={1}", sa, sb); Vymen(ref sa, ref sb); Console.WriteLine("sa={0} sb={1}", sa, sb); double da = 5.00; double db = 17.00; Console.WriteLine("da={0} db={1}", da, db); Vymen(ref da, ref db); Console.WriteLine("da={0} db={1}", da, db); } } }