You are on page 1of 17

Different Projects of VB.

NET
y Desktop base y Mobile base y Webpage base y Custom base y Web services

: Mobile game

Components of IDE
1. 2. 3. 4. 5. 6.

Menubar Tool box Form design view Properties window Solution explorer Toolbar

The mode in which you design the form , add controls is known as Design Mode The mode in which you can see after execute the form / project is known as Run Mode The view in which you write coding of the control is known as coding view.

Features of .NET
y Object Oriented Programming System y Inbuilt Memory management y Multilanguage and Multidevice support y Faster and easy development of web application y XML support y Easy deployment and configuration

DECLARATION
y You can declare any variable here as  Dim I as integer  Dim a , b, c as integer  Dim strName as string  Dim chrChar as character
 

Different data types available here are as ( Number , Character and Miscellaneous) Number : Integral
( Integer (32 bit), Short (16 bit), Long (64 bit), Byte (8 bit)) Non Integral ( Decimal (128 bit fixed pt.) , Single (32 bit floating pt) ,Double ((64 bit flt.pt.)
)

Character : Character and String Miscellaneous : Boolean , Date , Object

What is OBJECT data type? Why it is different from other data type?
y It is different from other data type as it can store any type of

data in object.
y It is slower than other data type y It does not store the data itself, but pointer to the value. y Eg. Dim I as integer = 6 y It will create two box , first by the name of I and second the

address of that box which contains value 6.


x01 I 6 x01

Default values of variables


y Zero ( 0 ) for all numeric types ( including

byte )

y Nothing for all types ( including object string

and arrays )
y Binary 0 for character y False for boolean y 12:00 A.M. 1,1,0001 for date

2 types of conversion
y An implicit conversion does not

require any special syntax in the source code.


y An explicit conversion uses a type

conversion keyword.

Implicit
Dim K As Integer Dim Q As Double K = 435 Q=K

Explicit
yCbool
( this fn. will return T/ F )

Dim A, B, C As Integer Dim Check As Boolean A=5 B=5 Check = CBool(A = B) ' Check is set to True.

Cchar
y The input argument to CChar must be of data

type String. Dim MyString As String Dim MyChar As Char MyString = "BCD" ' CChar converts only first character of string. MyChar = CChar(MyString) ' MyChar is set to "B".

Cdate
y such as #Feb 12, 1969# and #4:45:23 PM#,

instead.
Dim MyDateString, MyTimeString As String Dim MyDate, MyTime As Date MyDateString = "February 12, 1969" MyTimeString = "4:35:47 PM" ' ...

MyDate = CDate(MyDateString) ' Convert to Date data type. MyTime = CDate(MyTimeString) ' Convert to Date data type.

Explicit
y y y y y y y y y y

Cint to integer CDbl to Double CDec to Decimal CLng to Long CStr to String CShort to short integer Csng to Signed CObj to Object Cchar to character CDate to date

CTYPE Function
y It uses to convert one type to another type.

y Ctype(expression,Type name)
Example

yCtype(no,Integer)

CTYPE Function

Dim no As Integer Dim no2 As Double no2 = 55.32 no = CType(no2, Integer) MsgBox(no)

OPERATORS
y Operators are symbols (characters or keywords)

that specify operations to be performed on one or two operands (or arguments). y Operators that take one operand are called unary operators. y Operators that take two operands are called binary operators. y Unary operators use prefix notation, meaning that the operator precedes the operand (e.g., -5). Binary operators (except for one case) use infix notation, meaning that the operator is between the operands (e.g., 1 + 2).

OPERATORS
y Unary Operators y Used with a single operand. y Examples of unary operator include the increment operator

(++), which is used to increment scalar values, and the operator (NOT), which are used to like a=-5 etc.

y Binary Operators y Used with a two operands. y Examples of binary operator include the multiplication

operator (*), which is used to multiply two values, and the division operator (/), which is used to divide two values.

Categorize of operators
Arithmetic Assignment Comparison/Relational Concatenation Logical/bitwise operations ^, , *, / (Regular div.), \ (Integer div.), Mod, +, = =, ^=, *=, /=, \=, +=, -=, &= =, <>, <, >, <=, >=, Like, Is &, + Not, And, Or, Xor, AndAlso, OrElse

You might also like