string.Substring, string.Concat usage

string.Concat:

parameter 

arg0

Object or a null reference (in Visual Basic is Nothing).


return value  
arg0 value of String representation.

The value string.Concat ( "a", "b", "c", "d") is "abcd", the role of the connection string.

string.Substring
String.Substring (Int32)

Examples retrieved from substring. Substring starting at the specified character position.

Such as:

string str = "abcdefg";

str = str.Substring(3);

Str result is "efg";

Because the string index starts at 0, 3 in fact, is the fourth character.

String.Substring (Int32, Int32)

Examples retrieved from substring. Substring starting at the specified character position and having a specified length.

string str = "abcdefg";

str = str.Substring(3,1);

Str is the value "e", taken from the beginning a fourth length.


Reproduced in: https: //www.cnblogs.com/springyangwc/archive/2011/02/18/1958072.html

Guess you like

Origin blog.csdn.net/weixin_34303897/article/details/93340799