C# string???????
???????????? ???????[ 2015/5/7 13:38:52 ] ???????????????
?????????? #region new string() ToCharArray()
????//string str = "abcdef";
????////str[0] = 'b';
????//////?????--->char????(?????д)
????////char[] chs = str.ToCharArray();
????////chs[0] = 'b';
????//////???????char?????????????????
????////str = new string(chs);
????//Console.WriteLine(str[0]);
????#endregion
????#region Length????
????//Console.WriteLine("??????????????????????????");
????//string name = Console.ReadLine();
????//Console.WriteLine("??????????????{0}????"??name.Length);
????#endregion
????#region ToUpper() ToLower() Equals()
????//Console.WriteLine("?????????????γ?");
????//string lessonOne = Console.ReadLine();
????////??????д
????////lessonOne = lessonOne.ToUpper();
????////?????Сд
????////lessonOne = lessonOne.ToLower();
????//Console.WriteLine("?????????????γ?");
????//string lessonTwo = Console.ReadLine();
????////lessonTwo = lessonTwo.ToUpper();
????////lessonTwo = lessonTwo.ToLower();
????//if (lesssonsonOne.Equals(leTwo??StringComparison.OrdinalIgnoreCase))
????//{
????// Console.WriteLine("?????????γ????");
????//}
????//else
????//{
????// Console.WriteLine("?????????γ?????");
????//}
????#endregion
????#region Split() ?????????
????////string str = "abc ??????d?? ??--??ef????-- 0987";
????//////??????????????????????
????////string[] strNew = str.Split(new char[] { ' '?? '??'?? '-' }?? StringSplitOptions.RemoveEmptyEntries);
????////??????????????????"2008-08-08"???з?????????????2008??08??08???
????////????????????????????:2008-08-08???????????????????2008??1??2??
????//string date = "2008-08-08";// "2008??08??08??";
????//string[] newDate = date.Split(new char[] { '-' }?? StringSplitOptions.RemoveEmptyEntries);
????//date = newDate[0] + "??" + newDate[1] + "??" + newDate[2] + "??";
????//Console.WriteLine(date);
????//Console.ReadKey();
????#endregion
????#region Contains()?ж??????? Replace()?滻
????//Console.WriteLine("?????????????");
????//string input = Console.ReadLine();
????////1???ж???????????????д?
????//if (input.Contains("????"))
????//{
????// //2???????滻
????// input = input.Replace("????"?? "***");
????//}
????//Console.WriteLine(input);
????//Console.ReadKey();
????#endregion
????#region StartsWith() EndsWith()
????//string str = "????????£???й????";
????////if (str.StartsWith("?"))
????////{
????//// Console.WriteLine("???");
????////}
????////else
????////{
????//// Console.WriteLine("????");
????////}
????//Console.WriteLine(str.EndsWith("????????£???й????") ? "???" : "????");
????#endregion
????#region Trim() TrimEnd() TrimStart()
????/*string str = "---- ---1 2---3- -- ----";
????////str = str.Trim(); ???????????????
????////str = str.TrimStart(); ??????????????
????////str = str.TrimEnd();?????????
????str = str.Trim('-'??' ');
????//string[] strNew = str.Split(new char[] { '-'?? ' ' }?? StringSplitOptions.RemoveEmptyEntries);
????Console.Write(str);
????Console.ReadKey(); */
????#endregion
????#region Substring() ????????
????string str = "??????????????????????????";
????str = str.Substring(12??2);
????Console.WriteLine(str);
????Console.ReadKey();
????#endregion
????#region LastIndexof()??????????????????к???γ????λ??
????//string path = @"c:ace???df??????????.avi";
????////??????????????????к???γ????λ??
????////??? \??·???к???γ????λ??
????//int index = path.LastIndexOf('\');
????//string fileName = path.Substring(index + 1);
????//Console.WriteLine(fileName);
????//Console.ReadKey();
????#endregion
????#region IndexOf()
????/* string str = "??????????£???????????";
????int index = str.IndexOf('a'?? 3);
????Console.WriteLine(index);
????Console.ReadKey();*/
????#endregion
????//Console.WriteLine(string.IsNullOrEmpty(null) ? "yes" : "no");
????/* string[] names = { "????"?? "????"?? "????"?? "????"?? "????" };
????//????|????|????|????|????
????string str = string.Join("|"?? names);
????Console.WriteLine(str);
????Console.ReadKey();*/
????//???????2??????????????????????????е?????????????? “I love you"→“I evol uoy"
????//string str = "Chinese food is best food";
????////???????????? ????????
????//string[] strNew = str.Split(new char[] { ' ' }?? StringSplitOptions.RemoveEmptyEntries);
????//for (int i = 0; i < strNew.Length; i++)
????//{
????// char[] chs = strNew[i].ToCharArray();
????// for (int j = 0; j < chs.Length / 2; j++)
????// {
????// char temp = chs[j];
????// chs[j] = chs[chs.Length - 1 - j];
????// chs[chs.Length - 1 - j] = temp;
????// }
????// strNew[i] = new string(chs);
????//}
????////?????嵽?????????????????????
????//str = string.Join(" "?? strNew);
????//Console.WriteLine(str);
????//Console.ReadKey();
????//???????3????csv????е????????????綽??????????????csv?????csv???????????????????????????
????//string[] lines = File.ReadAllLines(@"C:UsersSpringRainDesktop?綽.txt"?? Encoding.Default);
????//for (int i = 0; i < lines.Length; i++)
????//{
????// //????????滻??""
????// lines[i] = lines[i].Replace("""?? "");
????// //????????????
????// string[] linesNew = lines[i].Split(new char[] { '??'?? ';' }?? StringSplitOptions.RemoveEmptyEntries);
????// Console.WriteLine("??????" + linesNew[0] + linesNew[1] + " ?綽:" + linesNew[2]);
????//}
????/* string str = "???????????????????·???????????????:“??????????????”??????????????";
????int index = str.IndexOf("??");
????Console.WriteLine("????????????λ??{0}"??index);
????int count=1;
????while(index!=-1)
????{
????count++;
????index = str.IndexOf("??"?? index + 1);
????if(index==-1)
????{
????break;
????}
????Console.WriteLine("??{0}?γ????????λ????{1}"??count??index);
????}
????Console.ReadKey();*/
????????Equals??????
Person p1 = new Person() { Name = "?????"?? Age = 18 };
Person p2 = new Person() { Name = "?????"?? Age = 18 };
//if (p1.Equals(p2)) //?????????Equals????????????
//{
// Console.WriteLine("???");
//}
//else
//{
// Console.WriteLine("?????");
//}
class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
?????????????????????????д
public override bool Equals(object obj)
{
Person person = obj as Person;
if (this.Name == person.Name && this.Age == person.Age)
{
return true;
}
else
{
return false;
}
}
StringBuilder sb = new StringBuilder();
//sb.Append("123");
//sb.Append("????");
Console.Writeline(sb);???123????
Person p1 = new Person() { Name = "?????"?? Age = 18 };
class Person
{
public string Name { get; set; }
public int Age { get; set; }
}
Console.WriteLine(p1.ToString());//??????????????????????
???????????????????????漰???????????????????SPASVOС??(021-61079698-8054)?????????????????????????
??????
???????C#?е?StringC# Socket???????????????????C#?????????????????????????C#???????C#????????????Log4net??????δ????C#?????????????C#?????????????????C#???????????????C#????????????????C#7 ?е?Tuple??????C#??TypeScript - GeneratorC# ?????????細(xì)??????????C#?е???н???C#??MySQL?????????μ??Ч?????д??C#????C++??dll???C#??VS2010????е??????

???·???
??????????????????
2023/3/23 14:23:39???д?ò??????????
2023/3/22 16:17:39????????????????????Щ??
2022/6/14 16:14:27??????????????????????????
2021/10/18 15:37:44???????????????
2021/9/17 15:19:29???·???????·
2021/9/14 15:42:25?????????????
2021/5/28 17:25:47??????APP??????????
2021/5/8 17:01:11????????
?????????App Bug???????????????????????Jmeter?????????QC??????APP????????????????app?????е????????jenkins+testng+ant+webdriver??????????????JMeter????HTTP???????Selenium 2.0 WebDriver ??????