c#中如何取字符串最左边和最右边的字符??

来源:百度知道 编辑:UC知道 时间:2024/06/14 18:55:03
c#中如何取字符串最左边和最右边的字符??,请高手指教

string left = str.Substring(0, 1);
string right = str.Substring(str.Length - 1);

string left = str.Substring(0, 1);
string right = str.Substring(str.Length - 1);
正解.

楼上正解.

--------------------
另外麻烦大家帮忙看一下我的问题.
关于ASP.NET空间的小小疑问
http://zhidao.baidu.com/question/34558728.html