我一直使用String.IsNullOrEmpty來檢查一個空字符串。最近我注意到一個「」並不是一個空字符串。例如,.Net:空字符串不是空白字符?
Dim test As String = " "
If String.IsNullOrEmpty(test) Then
MessageBox.Show("Empty String")
Else
MessageBox.Show("Not Emtpy String")
End If
它將顯示「非空字符串」。那麼我們如何檢查字符串中的「」或「」?
編輯:我不知道「」算作人物。
將拋出修剪異常()與空 – andleer 2009-04-07 15:21:57
是的,我認爲這是上鍊鏈接:) – 2009-04-08 08:33:14