150 likes | 319 Views
VB.NET Preview. ILM Proprietary and Confidential - http://www.ilmservice.com. New in VB.NET. Complete object orientation Inheritance Method overloading Constructors and destructors Interfaces Delegates Shared members (Static members) Structured exception handling Multi-threading.
E N D
VB.NET Preview ILM Proprietary and Confidential - http://www.ilmservice.com
New in VB.NET • Complete object orientation • Inheritance • Method overloading • Constructors and destructors • Interfaces • Delegates • Shared members (Static members) • Structured exception handling • Multi-threading ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • Lower bound of an array is always 0 • Lower bound of an array can not be changed with OPTION BASE statement • OPTION BASE statement is not supported in VB.NET ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • Can not specify fixed size array which can not be resized with ReDim statement • VB 6.0 Syntax Dim Month(0 to 11) as Integer • VB.NET Syntax Dim Month(12) as Integer Dim Month() as Integer = new Integer(12) ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • In VB6.0, you can use ReDim statement to declare and initialize an array • In VB.NET, you have to declare an array with Dim, and re-initialize it with ReDim ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • In VB6.0, you can declare a String of a fixed size • Dim Name as String * 30 • In VB.NET, you can not declare fixed size String variables. ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • Changes in integer types as listed below • In VB6.0 • 16 bits = Integer • 32 bits = Long • 64 bits = {does not exist} • In VB.NET • 16 bits = Short • 32 bits = Integer • 64 bits = Long ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • In VB6.0 • Variant serves as universal data type • In VB.NET • Object serves as universal data type • Object provides all variant functionality • Variant does not exist in VB.NET • VarType function is not supported ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • In VB6.0 • And, Or, Xor, and Not are used for both Boolean and Bitwise operations • In VB.NET • And, Or, Xor, Not are strictly Boolean • BitAnd, BitOr, BitXor, BitNot are Bitwise operators ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • VB 6.0 • Default properties are supported on objects and controls • VB.NET • Default properties are not supported ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • In VB6.0 • Structure is declared with Type statement and all members are public • In VB.NET • Structure is declared with Structure statement, and all members must have access modifier • Type statement is not supported ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • In VB6.0 Dim I, J as Integer • I is variant, J is Integer • In VB.NET Dim I, J as Integer • I is Integer, J is Integer ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • In VB6.0 Set O = new Object • Sets O as Nothing, and it is not created until its first used • In VB.NET • Set statement does not exist • O = new Object will create instance right away ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • In VB6.0 • You can declare Optional parameter without default value • In VB.NET • Every Optional parameter must specify default value which would be passed if parameter is not passed ILM Proprietary and Confidential - http://www.ilmservice.com
Changes in VB.NET • In VB6.0 • Parenthesis are required if calling function but not if calling Sub • In VB.NET • Parenthesis are always required ILM Proprietary and Confidential - http://www.ilmservice.com