1 / 10

Visual Basic .NET

Visual Basic .NET. Introduction chapter #1. VB.Net General features. It is an object oriented language In the past VB had objects but focus was not placed on them VB. Net use objects and inheritance with everything Uses exception handling extensively

Download Presentation

Visual Basic .NET

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. Visual Basic .NET Introduction chapter #1

  2. VB.Net General features • It is an object oriented language • In the past VB had objects but focus was not placed on them • VB. Net use objects and inheritance with everything • Uses exception handling extensively • Like with most OOP languages, exceptions that are not handled will cause programs to abnormally end or exit • Uses “generics” with creating classes and Sub programs • Provides a quick way to develop heavy duty applications in a windowing environment • It is a useful tool for developing event driven programs • Can create both windows applications and web applications at the click of a mouse button

  3. VB.Net General features • The interface between the Databases and applications • Are the same between web apps and windows apps • All data are transferred between the apps in XML format regardless if it is a web application or a windows application • A copy of the data from the database is loaded into a data set. • Persistent connections between the application and the database no longer exists • Every form is a class and new forms now have to be instantiated • VB .Net is still not case sensitive

  4. Data Types in VB .NET • Data Types and possible values • Integer -> (4 bytes) • Double -> floating point numbers with 14 digits of accuracy (8 Bytes) • Decimal -> decimal values ( 16 bytes replaced currency in 6.0) • Date -> the date (8 Bytes) • Byte -> 0 to 255 (1 Byte) • Char -> Unicode character (2 Bytes) • Boolean ->True or false value (2 Bytes) • Single -> floating point number with 6 digits of accuracy (4 bytes) • Short -> 2 byte integer • Long -> 8 byte integer • String -> an arrangement of alpha-numeric characters varies in length • Object -> any data type 4 bytes

  5. Functions and Sub procedures / Programs in VB .NET (Methods) Functions and sub procedures must either have a sub or function keyword in the function or sub procedure heading They can be either public or private (following the same conventions in OOP languages such as C++ or Java) All parameters are passed by value by default in VB .NET Parameters of any data type may be passed by reference All Objects and arrays are passed by reference not value All events are handled by a sub procedure in VB .NET Functions return a value and Sub Procedures do Not

  6. The .NET Framework • Primarily a development platform (mostly effects application development) • Consists of two main parts • Common Language Runtime • .NET Framework Class Library

  7. CLR (Common Language Runtime) • CLR works like a virtual machine in executing all languages. • All .NET languages must obey the rules and standards imposed by CLR. Examples: • Object declaration, creation and use • Data types, language libraries • Error and exception handling • Interactive Development Environment (IDE) • Development • Mixed language applications • Common Language Specification (CLS) • Common Type System (CTS) • Standard class framework • Automatic memory management • Consistent error handling and safer execution

  8. Compilation of .NET code • All .NET languages are first compiled into an intermediate language called MSIL or IL (Microsoft Intermediate Language) • The MSIL is then “Just In Time” (JIT) compiled at first execution of the code and managed by the CLR • All MSIL or IL code can be compiled directly to native code with the following • Compiling native code will provide faster startup execution of the code • Performance during execution of the code will then be sacrificed • During JIT Optimization is placed on the Managed Code in order to improve performance at the time of execution

  9. .Net Framework Class Library • Provide a library of base classes that developers can use in their own applications written in ANY .Net language • Because of the use of these base classes, Inheritance can then be extensively used in languages that use the .Net Framework • .Net applications can be written by any or a combination of many .Net languages • Languages include • VB .Net • C# • J# • Visual C++ (default in studio is set for managed C++)

  10. Framework, Languages, And Tools VB VC++ VC# JScript … Visual Studio.NET Common Language Specification ASP.NET: Web Services and Web Forms WindowsForms ADO.NET: Data and XML Base Class Library Common Language Runtime

More Related