Published on

Published in: Education, Technology
  • Be the first to comment

  • Be the first to like this

No Downloads
Total views
On SlideShare
From Embeds
Number of Embeds
Embeds 0
No embeds

No notes for slide


  1. 1. VB.NET Introduction
  2. 2. What is .NET Framework <ul><li>The Microsoft .NET Framework is a software framework that can be installed on computers running Microsoft Windows operating systems . </li></ul><ul><li>The .NET Framework is a key Microsoft offering and is intended to be used by most new applications created for the Windows platform. </li></ul><ul><li>The framework's Base Class Library provides a large range of features including user interface , data and data access , database connectivity , cryptography , web application development, numeric algorithms , and network communications . </li></ul>
  3. 3. Understanding the .NET Framework <ul><li>. NET framework is a Windows Component that supports the building and running of windows applications and XML Web services . The purpose of the component is to provide the user with a consistent object oriented programming environment whether the code is stored locally or remotely. </li></ul><ul><li>The .NET framework has two major components-- The Common Runtime (CLR) and the Class Library </li></ul>
  4. 4. CLR (Common Language Runtime) <ul><li>The Common Language Runtime (CLR) is a core component of Microsoft's .NET initiative. </li></ul><ul><li>The CLR runs a form of bytecode called the Common Intermediate Language (CIL, previously known as MSIL -- Microsoft Intermediate Language). </li></ul><ul><li>Developers using the CLR write code in a language such as C# or VB.NET . At compile time , a .NET compiler converts such code into CIL code. At runtime , the CLR's just-in-time compiler converts the CIL code into code native to the operating system. </li></ul>
  5. 5. Working of CLR
  6. 6. CLR Features <ul><li>Memory Management (Memory management is the act of managing computer memory. In its simpler forms, this involves providing ways to allocate portions of memory to programs at their request, and freeing it for reuse when no longer needed. The management of main memory is critical to the computer system. </li></ul><ul><li>Virtual memory systems separate the memory addresses used by a process from actual physical addresses, allowing separation of processes and increasing the effectively available amount of RAM using disk swapping The quality of the virtual memory manager can have a big impact on overall system performance.) </li></ul><ul><li>Thread Management </li></ul><ul><li>Exception Handling </li></ul><ul><li>Garbage Collection </li></ul><ul><li>Security </li></ul><ul><li>Other system services. </li></ul><ul><li>CLR eliminates many common software issues like handling of object layout, references to objects and garbage clearance </li></ul><ul><li>It lends support to existing applications. </li></ul>
  7. 7. Namespaces <ul><li>Namespaces </li></ul><ul><li>A namespace is a collection of different classes. All VB applications are developed using classes from the .NET System namespace. The namespace with all the built-in VB functionality is the System namespace. All other namespaces are based on this System namespace. </li></ul><ul><li>Some Namespaces and their use: </li></ul><ul><li>System : Includes essential classes and base classes for commonly used data types, events, exceptions and so on System.Collections : Includes classes and interfaces that define various collection of objects such as list, queues, hash tables, arrays, etc System.Data : Includes classes which lets us handle data from data sources System.Data.OleDb : Includes classes that support the OLEDB .NET provider System.Data.SqlClient : Includes classes that support the SQL Server .NET provider System.Diagnostics : Includes classes that allow to debug our application and to step through our code System.Drawing : Provides access to drawing methods </li></ul>
  8. 8. Namespaces <ul><li>System.Globalization : Includes classes that specify culture-related information System.IO: Includes classes for data access with Files System.Net : Provides interface to protocols used on the internet System.Reflection : Includes classes and interfaces that return information about types, methods and fields System.Security : Includes classes to support the structure of common language runtime security system System.Threading : Includes classes and interfaces to support multithreaded applications System.Web : Includes classes and interfaces that support browser-server communication System.Web.Services : Includes classes that let us build and use Web Services System.Windows.Forms : Includes classes for creating Windows based forms System.XML: Includes classes for XML support </li></ul>
  9. 9. Working With VB.NET <ul><li>In Visual Basic.Net there are 2 main applications we going to use. </li></ul><ul><li>Windows Application </li></ul><ul><li>Console Application </li></ul><ul><li>Windows Application </li></ul><ul><li>Windows Applications used for Design Purpose. </li></ul><ul><li>Console Application </li></ul><ul><li>Console Applications are command-line oriented applications that allow us to read characters from the console, write characters to the console and are executed in the DOS version. Console Applications are written in code and are supported by the System.Console namespace. </li></ul>
  10. 10. Working With VB.NET <ul><li>Example For Console Applications </li></ul><ul><li> Module Module1 Sub Main() System.Console.Write(&quot;Welcome to Console Applications&quot;) End Sub End Module </li></ul><ul><li>Note the first line, we're creating a Visual Basic Module and Modules are designed to hold code. All the code which we write should be within the Module. Next line starts with Sub Main(), the entry point of the program. The third line indicates that we are using the Write method of the System.Console class to write to the console. </li></ul>
  11. 11. Working With VB.NET <ul><li>Example For Windows Applications </li></ul><ul><li> Public Class Form1 Inherits System.Windows.Forms.Form Private Sub Form1_Load(ByVal sender As System.Object, ByVal e As System.EventArgs)_ Handles MyBase.Load End Sub Private Sub Button1_Click(ByVal sender As System.Object, ByVal e As _ System.EventArgs) Handles Button1.Click </li></ul><ul><li>MsgBox(&quot;Welcome to Forms&quot;) End Sub End Class </li></ul>