using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace rand
{
class Program
{
static void swap(ref int p, ref int q)
{
int tmp = p;
p = q;
q = tmp;
}
static void Main(string[] args)
{
int a = 1;
int b = 2;
swap(ref a, ref b);
Console.Write(a + " " + b);
Console.ReadLine();
}
}
}
c#---传址
最新推荐文章于 2024-04-23 14:36:56 发布