摘要:
如何将字符串转换为字符串数组?如string str = "abc";转换为string[] strs = {"a", "b", "c"};答案:string str = "abc"; string[] strs = Regex.Split(str, "(?<=.)(?=.)"); 阅读全文
摘要:
4.2 C#点滴小技巧和小知识 在c#中,string对象的==运算已经被强行重写,它就是表示 equals, 这就是说,在c#中,实现字符串值比较的话,只需要写成"hello"==aaa就行了, 这样设计的目的是为了更直观。 ---------------------------------------------------------------- 如果在方法前面同时使用protected... 阅读全文