Programming With Visual: Fundamentals of Programming Lecture # 1 Tariq Ibn Aziz
Programming With Visual: Fundamentals of Programming Lecture # 1 Tariq Ibn Aziz
Basic .NET
Fundamentals of Programming
Lecture # 1
Compunet Corporation 1
Evolution of computer languages
Compunet Corporation 2
Running a program
Compunet Corporation 3
Program Forms
• Program exist in two forms
– Source code (“hello.vb” text form of program)
– Object code (“hello.exe”executed by the computer)
• .NET compiler produce an object file that contain
intermediate code.
Compunet Corporation 4
Compiling a program
Compunet Corporation 5
Visual Studio.NET Development
Environment
• In Visual Studio.NET 2005,
many project templates are
available, such as:
– Console Application
– Window Application
– Windows Services
– ASP.NET Web Application
– Smart Device Application
Compunet Corporation 6
Object Oriented Programming
Compunet Corporation 7
Namespaces
• Namespace organizes base class libraries
• Top namespace is System
• All Windows Forms inherits the
System.Windows.Forms.Form namespace
Compunet Corporation 8
VB.NET Class Libraries
• VB.NET provides a number of libraries of utility classes
and methods
• System
• System.Console
• System.Data
• System.IO.File
• System.Web
• System.Windows
Compunet Corporation 9
The .NET Framework
• An architectural model for creating programs that interface with the operating
system and base class libraries
Compunet Corporation 10
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
Compunet Corporation 11
Program Statements
• Syntax means the rules used to distinguish valid
statements from invalid ones.
• Syntax is 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 12
VB.NET Application
• Use notepad 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
Compunet Corporation 13
VB.NET Application
• Compile the program • Output
c:\> ILoveVB
Compunet Corporation 14
IL Disassembler (ILDASM)
• View assembly using ILDASM
Compunet Corporation 15
Using the ILDASM
Compunet Corporation 16