1.//将字符串\”abcdefg\”按照”gfedcba“输出
static void Main(string[] args)
{
string str = \”abcdefg\”;
char[] ch = str.ToCharArray();
for (int i = 0; i < ch.Length / 2; i++)
{
char temp = ch[i];
ch[i] = ch[ch.Length – 1 – i];
ch[ch.Length – 1 – i] = temp;
}
str = new string(ch);
Console.WriteLine(str);
Console.ReadLine();
}
爱站程序员基地
![(原创)[C#] 一步一步自定义拖拽(Drag&Drop)时的鼠标效果:(一)基本原理及基本实现-爱站程序员基地](https://aiznh.com/wp-content/uploads/2022/07/20220721231016-62d9dcd85c40b-220x150.gif)

