using System;namespace StringApplication {class StringProg {static void Main(string[] args) {string str = Last night I dreamt of San Pedro;
编程学习网为您整理以下代码实例,主要实现:C#获取子串,希望可以帮到各位朋友。
using System;
namespace StringApplication {
class StringProg {
static voID Main(string[] args) {
string str = "Last night I dreamt of San Pedro";
Console.Writeline(str);
string substr = str.Substring(23);
Console.Writeline(substr);
}
}
}