日期:2014-05-17 浏览次数:21463 次
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace Tesing
{
class Program
{
static void Main(string[] args)
{
string test = "He+llo world!)";
string u;
u = test.Substring(0, 1);
test.Remove(1);
Console.WriteLine("剪切下来的字符串为{0},Test字符串的大小为{1}",u,test.Length);
int Cout;
char[] Signe = new char[] { '(', ')', '+', '-', '*', '/' };
test.Replace("!", "#");
Console.WriteLine("执行完Replace函数后的test:{0},它的长度{1}", test, test.Length);
Cout = test.IndexOfAny(Signe,0);
Console.WriteLine(Cout);
Console.ReadLine();
}
}
}