使用c#语言从 字符串PR3截取最后一个字符
使用C#语言可以通过以下代码从字符串"PR3"截取最后一个字符:
string str = "PR3";
char lastChar = str[str.Length - 1];
Console.WriteLine(lastChar);
输出结果为:
3
原文地址: https://www.cveoy.top/t/topic/iiZF 著作权归作者所有。请勿转载和采集!
安全问答是一个知识全球问答,包含丰富的问答知识
使用C#语言可以通过以下代码从字符串"PR3"截取最后一个字符:
string str = "PR3";
char lastChar = str[str.Length - 1];
Console.WriteLine(lastChar);
输出结果为:
3
原文地址: https://www.cveoy.top/t/topic/iiZF 著作权归作者所有。请勿转载和采集!