Dim p As Object =" Hello" Dim q As Object = Me MsgBox(TypeOf o Is String) MsgBox(TypeOf p是字符串) MsgBox(TypeOf q是字符串) /// - Herfried K. Wagner MVP·VB Classic,VB.NET < http://www.mvps.org/dotnet> \\\Dim o As Object = 2Dim p As Object = "Hello"Dim q As Object = MeMsgBox(TypeOf o Is String)MsgBox(TypeOf p Is String)MsgBox(TypeOf q Is String)/// --Herfried K. WagnerMVP · VB Classic, VB.NET<http://www.mvps.org/dotnet> 如果TypeOf是字符串那么 .... If TypeOf something Is String Then.... 这篇关于如果Object是String,测试的语法是什么?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-28 16:06