vb.net learning

Upload: arjunsingh

Post on 03-Jun-2018

263 views

Category:

Documents


0 download

TRANSCRIPT

  • 8/12/2019 VB.net Learning

    1/16

    CSC Proprietary 6/24/2014 3:41:11 AM 008_fmt_wht 1

    Dot Net

    Pawan Kumar Jasuja

  • 8/12/2019 VB.net Learning

    2/16

    CSC India 2

    Chapter 1 - Facts about Dot Net

    Introduction to Dot Net. Chapter 2 - Dot Net Framework

    Just In Time Compilers

    Chapter 3 - Different types of file in Web Project

    Chapter 4 - VB.NET Features

    Chapter 5 - Language Diff between VB & VB.NET

  • 8/12/2019 VB.net Learning

    3/16

    CSC India 3

    Facts about Dot Net

    General Facts

    Microsoft put their best men at work for a secret project called Next

    Generation Windows Services (NGWS),under the direct supervision of

    Mr. Bill Gates. The outcome of the project is what we now know as

    .NET.

    Microsoft has countered Java's Write once, Run anywhere premise,

    with Write many languages, Run on one Microsoft platform.

  • 8/12/2019 VB.net Learning

    4/16

    CSC India 4

    Introduction to Dot Net

    What is .Net?

    It is a platform neutral framework.

    Is a layer between the operating system and the programming

    language.

    It supports many programming languages, including VB.Net,C#

    etc.

    Net provides a common set of class libraries, which can be accessed from

    any .net based programming language.There will not be separate set of

    classes and libraries for each language. If you know any one .net language,

    you can write code in any .net language!!

  • 8/12/2019 VB.net Learning

    5/16

    CSC India 5

    Introduction to Dot Net

    In future versions of Windows, .net will be freely distributed as part

    of operating system and users will never have to install .net

    separately.

    What it is Not ?

    .Net is not an operating system.

    .Net is not a programming language.

    ".Net is a framework"

  • 8/12/2019 VB.net Learning

    6/16

    CSC India 6

    Dot Net Framework :

  • 8/12/2019 VB.net Learning

    7/16CSC India 7

    Just-In-Time Compliers:

    The Just-In-Time (JIT or JITter) compiler converts the MSIL (Microsoft Intermediate

    Language) code into the native code (CPU Specific code). The .NET runtime/Common

    Language Runtime (CLR) ships three different classes of JITters.

    Econo-JIT: This compiler converts the MSIL code into native code without any

    optimizations.

    Standard-JIT: This compiler takes the MSIL code and verified and optimize it. So this

    compiler requires lot of resources like, time to compile, larger memory footprint, etc.

    PreJIT: This is based on the Main JIT and it works like the traditional compilers rather

    than Just-In-Time compilers. This compiler is used at the time of installation and it

    reduce start up time.

  • 8/12/2019 VB.net Learning

    8/16CSC India 8

    VB.NET Features:

    Object Oriented Programming language. Support of inheritance,

    overloading, interfaces, shared members and constructors.

    Supports all CLS features such as accessing and working with .NET

    classes, interaction with other .NET languages, meta data support,

    common data types, and delegates.

    Multithreading support.

    Structured exception handling.

    Abstraction, Encapsulation, Polymorphism, and Inheritance are four basic

    properties of an object-oriented language. VB 6.0 supports all of these

    properties but not Inheritance. Now VB.NET supports Inheritance. This

    brings VB.NET in object-oriented languages category such as C++.

    Continue.

  • 8/12/2019 VB.net Learning

    9/16CSC India 9

    VB.NET Features:

    Overloading

    VB.NET supports method overloading using the overload keyword.

    Using this keyword, you can declare same method names with

    different arguments.

    Scope of a Class MembersBesides Private and Public, VB.NET introduces few new keywords.The

    following keywords are used to define scope of a class member.

    Private Scope is limited to the defined class only.

    Public Object can be called from the outside of the class.

    Friend: Scope is limited to the application in which class is defined.

    Protected Available to the class and its derived classes.

    Protected FriendAvailable to the class, the application, and the derived

    classes.

  • 8/12/2019 VB.net Learning

    10/16CSC India 10

    Language changes between VB and VB.NET:

    Data Type changes:

    Data Type VB 6.0 VB.NET

    Integer 16 bit size 32 bit size

    Long 32 bit size 64 bit size

    Currency Currency was used to store

    large floating point values.

    Replaced with decimal,

    supports

    Variant Can hold any type of data. Replaced with Object type.

    Can hold any type of data.

    Provide better results.

    Date Date used to stored as

    double.

    Introduces DateTime data

    type designed to store date

    in different formats.

  • 8/12/2019 VB.net Learning

    11/16CSC India 11

    VB.NET supports multiple variable declarations in the same line.:

    Dim s1,s2 as String

    VB.NET supports declaration and initialization on same line:

    Dim s1 As String = Pawan

    VB.NET supports block level variables. Variables declared within a block have

    scope only limited to that block :

    For I= 1 to 10

    Dim a as String

    -----

    ----

    Next

    Continue..

    Language changes between VB and VB.NET:

  • 8/12/2019 VB.net Learning

    12/16CSC India 12

    Language changes between VB and VB.NET:

    Improved Type Safety

    In VB 6.0, you can specify As Any for any type of argument with the

    declare statement when you declare a reference to an external procedure

    As Any keywords disable type checking and allow any data type to be

    passed in or returned. VB.NET does not support the Any keyword. You

    must specifically declare the data type of every argument and of the

    return.

    Variant Vs. Object

    In VB 6.0, Variant data type can store data of any type in a variable of

    type Variant. In VB.NET, Object can be used to hold data of any type.

    Array

    Lower bound for Array is 0 and you cant change this.

    We can have maximum 32 dimensions in an Array.

    Continue

  • 8/12/2019 VB.net Learning

    13/16CSC India 13

    Language changes between VB and VB.NET:

    Arithmetic Operators

    VB.NET now supports like shortcut operators. You can use same shortcuts for

    any operator such as *, /, |, and &.

    a+=5, a*=5 etc.

    Strings

    VB.NET doesnt support fixed length strings.

    ByVal is default Argument Type

    In VB 6.0, ByRef was default type when you call a function or sub. That

    means all changes would reflect in the variable you pass to a parameter. This

    behavior is changed in VB.NET. Now the default argument type is ByVal. If

    you dont specify the argument type, compiler takes it as ByVal.

  • 8/12/2019 VB.net Learning

    14/16CSC India 14

    Different types of file in Web Project:

    .aspxThe files having this extension are basically ASP.NET web pages. These

    basically contains the User Interface

    .ascx

    This file is called the ASP.NET User Control. A user control file is a simply

    text file which is saved with the extension "ascx". It does not contain html,

    body, and frame tag..asmx

    The files having extension .asmx are called ASP.NET Web Services

    web.config

    this file is basically XML-based configuration file for ASP.NET application. this

    file basically handles security, state management, and memory management

    issues

    global.asa

    This file is basically used to define the global variables and to response to

    global events

    Continue..

  • 8/12/2019 VB.net Learning

    15/16CSC India 15

    Different types of file in Web Project:

    disco or .vsdiscoThese are special discovery files used to find web services

    .vb or .cs

    These files are basically code-behind files and are used to separate the code

    from user interface(.aspx)

    .sln, .suo

    These are files which are basically used by Visual Studio .NET to group

    together projects. These files are only used during development

    Continue..

  • 8/12/2019 VB.net Learning

    16/16CSC I di 16

    THANK YOU