日期:2014-05-20  浏览次数:20767 次

C#中如何实现从字符里取字
VB中   "   dim   strY1   as   string
            strY1   =   Left( "abcdefgh ",   4);           "
在C#中如何实现?

------解决方案--------------------
string strY1= "abcdefgh ";
strY1 = strY1.Substring(0,4);
------解决方案--------------------
string strY1 = "abcdefgh ".SubString(0, 4);