字符长度太长,怎么截取啊
hicoo 2006-12-29 03:06:57 在VB里是这样写的,
Protected Function GetStr(ByVal inputName As String) As String
Dim temp As String = String.Empty
If (inputName.Length > 19) Then
temp = inputName.Substring(0, 8)
temp = temp & ".."
Return temp
Else
Return inputName
End If
End Function
请问在2005 C# 里要怎么写啊,谢谢