string.Concat:

参数 

arg0

Object 或 空引用(在 Visual Basic 中为 Nothing)。


返回值 
arg0 的值的 String 表示形式。

如 string.Concat("a","b","c","d") 的值是 "abcd",作用是连接字符串.

string.Substring
String.Substring (Int32)

从此实例检索子字符串。子字符串从指定的字符位置开始。

如:

string str = "abcdefg";

str = str.Substring(3);

str的结果是"efg";

因为字符串索引从0开始,3其实是第四个字符.

String.Substring (Int32, Int32)

从此实例检索子字符串。子字符串从指定的字符位置开始且具有指定的长度。

string str = "abcdefg";

str = str.Substring(3,1);

str 的值是"e",从第四位开始截取1长度.


相关文章:

  • 2022-12-23
  • 2021-04-18
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-08-02
  • 2021-08-20
猜你喜欢
  • 2022-02-23
  • 2021-05-24
  • 2022-12-23
  • 2021-08-15
  • 2021-10-18
  • 2021-08-12
相关资源
相似解决方案