VB.Net/Development/Is Value Type

Материал из VB Эксперт
Версия от 15:45, 26 мая 2010; Admin (обсуждение | вклад) (1 версия)
(разн.) ← Предыдущая | Текущая версия (разн.) | Следующая → (разн.)
Перейти к: навигация, поиск

Is it a Value Type

<source lang="vbnet"> Imports System Imports System.Collections

Public Class MainClass

 Shared Sub Main()
       Dim a As Integer = 3
       Console.WriteLine("a is a value type is " & IsValueType(a))
 End Sub
 
 Shared Function IsValueType(ByVal thing As Object) As Boolean
     Return (TypeOf (thing) Is System.ValueType)
 End Function

End Class

      </source>