-->

Thursday, April 4, 2013

What is Difference Between static member and non static member

Also known as static member or instance member

(1)calling
Static : Static member always call from class name.
NonStatic : NonStatic member always call from instance of the class.

Note: Those values who have not change during the entire program that values keep as a static 
Example:
In Circle class the pi=3.14 value always must constant so use pi as a static member

(2)declaration
NonStatic declaration :  float pi=3.14F;
Static declaration :  static float pi=3.14F;


(3)In case of Constructor
Static : We can't use access modifier with static constructor.
NonStatic: we use always public modifier with non static constructor.

Note: 
Static Constructor is called only once , no matter how many instances you create 
Static Constructors are called before instance constructors.


(4)In Case of memory
In instance member belongs to specific instance (object) of a class. If i create 3 objects of a class , i will have 3 sets of instance members in the memory , where as there will ever be only one copy of a static member , no matter how many instances of a class are created.

Wednesday, April 3, 2013

What is the Difference between procedure and function in VB.NET

(1)
Procedure: Procedure does not return a value.
Function : Function does return a value.

(2)
Procedure: Use 'sub' keyword for creating procedure
Function : Function use 'function' Keyword for creating function.





What is the Difference between ASP and ASP.NET

There are many difference in asp and asp.net
(1)
ASP : If you want to make a project then you write more code compare to ASP.NET
ASP.NET : Write Less code compare to ASP

(2)
ASP: ASP use Recordset  for data binding
ASP.NET : ASP use ado.net, entity framework and many more for data binding

(3)
ASP: ASP does not support rich control like calander control
ASP.NET : ASP.NET support rich control

(4)
ASP: ASP have only one page for designing and coding (presentation + business logic on single page)
ASP.NET : ASP.NET have two pages for designing and coding (presentation page (.aspx) + business logic page (.aspx.cs))

(5)
ASP:  ASP version 1.0 or 1.1
ASP.NET :  Updated Version











© Copyright 2013 Computer Programming | All Right Reserved