Professional Documents
Culture Documents
Lecture 02 - Download and Install Visual Studio 2019
Lecture 02 - Download and Install Visual Studio 2019
https://sites.google.com/a/quest.edu.pk/dr-irfana-memon/lecture-slides
Course Content
Review of C# Syntax: Overview of Writing Applications using C#, Data types,
Operators, and Expressions
C# Programming Language Constructs, Creating Methods
Invoking Methods, Handling Exceptions, Creating overloaded Methods
Developing the Code for a Graphical Application: Implementing Structs and Enums
Implementing Type-safe Collections: Creating Classes, Organizing Data into Collections,
7
C# Advantages and
Disadvantages
Advantages of C#
Object-Oriented Language
Automatic Garbage Collection
Cross Platform
Backward Compatibility
Applications of C#
Games using Unity
Web Applications Client-Server Applications
Windows Applications that run on desktops
Web Services Applications 8
Console Applications
Class Libraries
Characteristics of C#
• C# has strong resemblance with Java, it has numerous
strong programming features that make it endearing to a
number of programmers worldwide.
• Following is the list of few important features of C#
Boolean Conditions
Automatic Garbage Collection
Standard Library
10
.NET Framework
• The .NET framework is a revolutionary platform that helps
you to write the following types of applications
Windows applications
Web applications
Web services
• The .NET framework applications are multi-platform
applications.
Figure 1
Visual Studio
• The next window you will see Figure 2 is the welcome
window. This figure shows that I am installing.
• The next line defines the Main method, which is the entry
point for all C# programs. The Main method states what the
class does when executed. 39
First C# Program using System;
namespace HelloWorldApplication
static: This keyword is used {
for invoking any method class HelloWorld
{
without creating an instance
static void Main(string[] args)
of class. Static is generally {
used for defining things at /* my first program in C# */
class level and don’t need any Console.WriteLine("Hello World");
instance of class for accessing
these. Console.ReadKey();
}
44
Compiling and Execution of C#
Program
If you are using Visual Studio.Net for compiling and executing
C# programs, take the following steps:
• Start Visual Studio.
• On the menu bar, choose File -> New -> Project.