.NET PLATFORM Technology desigened for distributed computing for easy development & deployment of internet application. The core technology consist .NET Framework, .NET Enterprise Servers, .Net Building block services, Visual studio .NET and Windows. The components of .NET Framework are common language runtime(CLR), Class Libraries, Data and XML, Web services and forms, Windows Forms. CLR provides an envrironment in which you can execute code. It support all .NET compatible languages Web Services is a web component that aan be shared between WEB between Web based applications. Managed environment means managed by CLR, which mange Garbage collection, security and other similar features DEVELOPMENT ENVIRONMENT FEATURES File Extentions for VB.NET project is .vbproj, Classe is .vb , Module is .vb Namespaces organizes object and items and eliminate ambiguity when calling them(Organized hierarchy) You can call the objects by using Import statement without specifying fully qualified name. Server Explorer allows you to manipulate Databases and many Server items such as message queues, Event logs, Windows and XML web services. Object Browser has been enhanced to include Inheritance and interfaces in the object hierarchy. Conditional Breakpoints halt execution when a particulat condition is met. To achieve this you can set standard break point and then usr Breakpoint property Box to modify the coditions. CALLING FUNCTIONS AND SUBROUTINES You must use paranthesis to use subroutines or functions. VB6 has complex rules to use paranthesis Passing argument is BY Val or BY Ref VB6 By Ref is default VB.Net By Value is default. ByRef passes the memory location. procedure can modify the value directly. When control returns to the calling procedute the variable contains modified value ByVal passes copy of the variable to the procedure, if procedure modifies the value. the original value remains intact. VB6:- Need not specify default values for optional parameters. You can use Ismissing function to check whether the paramets have been passed. VB.Net:- You must include default values for optional parameters. Ismissing function is not available. VB6:-You can put static in front of function or subroutine. Local variables in static function or subroutine retain their values between multiple calls. VB.NET:- Static function or subroutine not supported. You must explicitly declare static variables. Static will retain the value, can not be available from other functions. Returning value from function: VB6: function name and return value. .Net :- you can use function name or Reurn keyword to return value. Function PutDate() As string ..... PutData="Get Data" or Return "GetData" End Function Exception Handling:- supported by multiple laguages. Allow filtering exception as "select case", Allow nested handling, code is easier to read and maintain. You can implement error handling VB6:-You can print erroir by Raiserror method. VB.net by try..catch and finally. .Net uses throw statement which allow you to create your exception. Try Code to be tried. You can exit from here and continue after end try Catch Define the exception type and action to be taken. Finally This block is optiopnal. It always execute. Define action to be taken. use for closing file database etc. End Try sub TryExceptyion Dim i1,i2 As decimal i1 = 22 , i2 = 0 Try if i1 = 100 then throw new exception("i = 100") endif iResult = i1/i2 ' Cause divide by zero error. MsgBox('Divide by Zero') ' will not execute catch eException as Exception ' catch exception MsgBox("Print error") or (Filtering exception) catch eException as DivideByzero MsgBox("Divide by zero") catch..... Finally beep End Try End sub |