使用VB.Net和SQL Server2005
Dim S as string
s = "Rajan"
s = "Sajan"
我想从字符串中提取第一个字符
预期输出
R
S
需要VB.Net代码帮助
发布于 2011-10-06 15:00:30
试试这个..。
Dim S As String
S = "RAJAN"
Dim answer As Char
answer = S.Substring(0, 1)
发布于 2011-10-06 15:14:50
试试这个:
Dim s = "RAJAN"
Dim firstChar = s(0)
你甚至可以这样做:
Dim firstChar = "RAJAN"(0)
发布于 2011-10-06 15:00:23
使用字符:
Dim firstChar As char;
firstChar = s.Chars(0);
http://vb.net-informations.com/string/vb.net_String_Chars.htm
https://stackoverflow.com/questions/7671081
复制相似问题