Funksiyada Ref kalit so'zidan foydalanish
Xolbek Xoliyorov
Last updated
Was this helpful?
Was this helpful?
static void swapp(ref int a, ref int b)
{
int k = a;
a = b;
b = k;
}using System;
namespace function3
{
class Program
{
static void Main(string[] args)
{
int a = 8, b = 5;
swapp(ref a,ref b);
Console.WriteLine(a+" "+b);
Console.ReadKey();
}
static void swapp(ref int a,ref int b)
{
int k = a;
a = b;
b = k;
}
}
}