Thursday, 30 October 2014

adding a Snippet to your Visual studio.


Code snipets in vs

try this out
for FOR loop
just write
then press tab two times..

for WHILE loop ,write

then press tab tab .

for DO WHILE loop, write

press tab tab


then press tab tab..

Saturday, 18 October 2014

Create an N-tier Architecture application.

In this Architecture we have multiple application . Where we bi-fercate a single application into multiple application .
Generally we use a single application to have the data model and the multiple application.
But for a N-tier architecture the application is divided into multiple application

DAL (Data Access Layer )
BAL (Business Access Layer )
Presentation Layer( It include MVC , ASP.Net )

Here we have a concept  in which we use a wrapper class where wrapper class represents the DataBase.

if we have a table in data base table like Employee the attributes are Emp_id , Emp_name , Emp_age , Emp_address

then you will have to make a class in your class library .

we have to make a GET or SET function with the use of encapsulation method .

Saturday, 11 October 2014

Type conversion in Visual Basic.

There are many different type of casting by which we can convert the data from one format to another.

CBool - converting to boolean .
CByte - converting to Byte .
CInt - converting to int .
CLng - Converting to long .
CDes- converting to decimal .
CStr - converting to string.
CUint - converting to int .
CUlng - convertingto ultra long .

Wednesday, 8 October 2014

How to add constructor to a clasS in VB.NET

While making  the class create a function named "new"

public class  NameOfTheClass

public sub new ()
End sub

public Sub new( str As String , Str1 As String )
End Sub
End class

This is a small example to show how to make the constructor

how to initialize variables in VB.NET

VB is a very basic language. Its has a very was history .Is not type safe is C#.NET.
VB was created for the ease and flexibility in programming.

NOW, initializing variable in VB.

Dim var As Integer 
Dim str As String  

Here we have initialize two different variable to int  and string Data Type.
We do not need to write semicolon (;) in the end of  the code a VB script .

Tuesday, 7 October 2014

What to choose from Inherits or Implements in VB

Its very simple to understand that ,
when we are having two  class  CLS1 & CLS2
then we have to use INHERITS

but in case we are having a class and a interface  CLAS1 & INTERFACE
then wee have to use  IMPLEMENTS