Liked us?

Everything to Improve Your knowledge VB.Net Data Types | <a href="/">Detailed expert reviews</a>

Sunday, February 26, 2012

VB.Net Data Types


VB.NET Data Types - i

What are Data types???

}  A data type is an attribute of a data which tells the computer (and the programmer) something about the kind of data it is.

Dim Statement (Visual Basic)

}  Declares and allocates storage space for one or more variables.
}  The Dim statement can declare the data type of a variable. You can specify any data type or the name of an enumeration, structure, class, or interface.
Eg:-
}   numberOfStudents As Integer
}    days() As Integer

Data Type Rules in VB.Net

}  Default Type
   If you do not specify datatype, the variable takes the data type of initializer. If neither datatype nor initializer is present, by default, the data type is Object Data Type. If you specify both datatype and initializer, the data type of initializer must be convertible to datatype.
Eg:-
    Dim finished As Boolean
    Dim monitorBox As System.Windows.Forms.Form
}  Different Types
   You can specify different data types for different variables by using a separate As clause for each variable you declare. Alternatively, you can declare several variables to be of the same type by using a common As clause. Each variable takes the data type specified in the first As clause encountered after its variablename part.
  
Eg:-
  a, b, c As Single, x, y As Double, i As Integer

Data Types in VB.Net

}  Integer
}  Long
}  Short
}  String
}  Char
}  Boolean
}  Etc.


1 comments:

  • March 20, 2013 at 7:18 AM

    its a beautiful blog post ,I really like this blog post, and I expect to see fresh content on this blog, hoping to notify me when I'll be back.

Post a Comment

 

Liked

Detailed expert reviews Copyright © 2011 | Template design by O Pregador | Powered by Blogger Templates