VB.NET & VarType() - VarType() : Returns a value indicating the subtype of a variable.
ShotDev Focus:
- VB.NET & VarType()
Example
VarType.aspx
<%@ Page Language="VB" %> <script runat="server"> Sub Page_Load(sender As Object, e As EventArgs) Dim strVar1(3) Dim strVar2,strVar3 strVar1(0) = 1 strVar1(1) = 2 strVar1(2) = 3 strVar1(3) = 4 strVar2 = "Weerachai Nukitram" strVar3 = 123456 Me.lblText1.Text = VarType(strVar1) Me.lblText2.Text = VarType(strVar2) Me.lblText3.Text = VarType(strVar3) End Sub </script> <html> <head> <title>ShotDev.Com Tutorial</title> </head> <body> <form runat="server"> <asp:Label id="lblText1" runat="server"></asp:Label><br /> <asp:Label id="lblText2" runat="server"></asp:Label><br /> <asp:Label id="lblText3" runat="server"></asp:Label><br /> </form> </body> </html>
Screenshot