2008-06-20から1日間の記事一覧

型チェック

System.Type型を使って、オブジェクトの型チェックを行ってみます。 Dim t As System.Type Dim obj As Object (代入省略) If t is obj.GetType() Then ' objはt型 ElseIf t.IsInstanceOf(obj) = True Then ' objはtから派生したクラスのオブジェクト End If …