1 / 21

Programming with Visual Basic .NET

Programming with Visual Basic .NET. Fundamentals of Programming Lecture # 1 Tariq Ibn Aziz. Hardware components. Evolution of computer languages. Running a program. The .NET Framework.

remerson
Download Presentation

Programming with 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. Programming with Visual Basic .NET Fundamentals of Programming Lecture # 1 Tariq Ibn Aziz Compunet Corporation

  2. Hardware components Compunet Corporation

  3. Evolution of computer languages Compunet Corporation

  4. Running a program Compunet Corporation

  5. The .NET Framework • An architectural model for creating programs that interface with the operating system and base class libraries Compunet Corporation

  6. The .NET Framework • Contains a hierarchical set of Base Class Libraries Compunet Corporation

  7. The .NET Framework • Base class libraries are code libraries that provide general functions Compunet Corporation

  8. Common Language Runtime • Each .NET language compiles into a common intermediate language and common type system • Assembly contains compiled .NET program • The compiled .NET program contains the intermediate language and metadata • Metadata describes the assembly contents Compunet Corporation

  9. Compiling a program Compunet Corporation

  10. VB.NET Development Environment • Visual Studio.NET 2003 contains what you need to start building and executing VB.NET applications. • Many Project templates are available in Visual Basic Project development environment, some of them are: • Window Application • ASP.NET Application • Smart Device Application • ASP.NET Web Application • Console Application • Windows Services • Its trial version can be installed on machine. Compunet Corporation

  11. Visual Basic • Visual Basic is an Object-Oriented Programming Language • Object contains data, method and constructor Compunet Corporation

  12. Program exist in two forms Source code (text form of program) Object code (executed by the computer) .NET compiler produce an object file that contain intermediate code. Program Forms Compunet Corporation

  13. Namespaces • Organizes base class libraries • Top namespace is System • All Windows Forms inherits the System.Windows.Forms.Form namespace Compunet Corporation

  14. VB.NET Class Libraries • Provides a number of libraries of utility classes and methods • System • System.Console • System.Diagnostics • System.Data • System.Data.sqlClient • System.Web • System.Xml • System.IO.File Compunet Corporation

  15. Program Statements • “A program statement is any combination of Visual Basic keywords, properties, functions, operators, and symbols that (make up) a valid instruction for the Visual Basic compiler. (see p. 127) • For example: End Label1.Text = TimeString • Syntax means the rules used to distinguish valid statements from invalid ones. It’s like grammar in English. If the syntax is not correct, the compiler will give you an error when you build your program. It’s possible to write a statement with good syntax but bad semantics (meaning). This may result in run-time errors. Compunet Corporation

  16. VB.NET Application • Use any text editor to write this VB.NET program, call ILoveVB.vb • VB.NET is not case sensitive, so be sure while writing the filename and class name Public Module Hello Sub Main() System.Console.WriteLine("I Love VB…") End Sub End Module ' Run this at the command line ' vbc ILoveVB.vb Compunet Corporation

  17. VB.NET Application • To compile this program c:\> vbc ILoveVB.vb • To run your program c:\> ILoveVB • You should see the following output I Love VB … Compunet Corporation

  18. Testing • Blackbox testing – testing a program without knowing what’s inside it (it’s a black box). Test plans developed by looking at requirements statement. • Whitebox testing – testing a program with full knowledge of how it works. Test plans developed by looking at the code. Every line of code should work correctly all the time! Compunet Corporation

  19. VB.NET Application(Exercise) • Enter and compile this example on your PC to see whether your Software installation is OK Compunet Corporation

  20. IL Disassembler (ILDASM) • View assembly using ILDASM • Displays intermediate language • Can view information about namespaces, classes, and other programming structures Compunet Corporation

  21. Using the ILDASM Compunet Corporation

More Related