0% found this document useful (0 votes)
28 views

Introduction To Visual Studio and C Lec 1

Uploaded by

hasnainmushtaq23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
28 views

Introduction To Visual Studio and C Lec 1

Uploaded by

hasnainmushtaq23
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 9

Introduction to Visual Studio and C#

1. Introduction
In this Lecture, we will use Visual Studio and C#. C# is the programming language, while
Visual Studio is the development environment.

1.1. Visual Studio


Microsoft Visual Studio is an integrated development environment (IDE) from Microsoft. It
can be used to develop console and graphical user interface applications along with Windows
Forms applications, web sites, web applications, and web services in both native code together
with managed code for all platforms supported by Microsoft Windows, Windows Phone,
Windows CE, .NET Framework, .NET Compact Framework and Microsoft Silverlight.
Below we see the integrated development environment (IDE) in Visual Studio:

New projects are created from the “New Project” window:


1.2. C#
C# is pronounced “see sharp”. C# is an object-oriented programming language and part of
the .NET family from Microsoft. C# is very similar to C++ and Java. C# is developed by Microsoft
and works only on the Windows platform.

1.3. .NET Framework


The .NET Framework (pronounced “dot net”) is a software framework that runs primarily on
Microsoft Windows. It includes a large library and supports several programming languages
which allow language interoperability (each language can use code written in other languages).
The .NET library is available to all the programming languages that .NET supports. Programs
written for the .NET Framework execute in a software environment, known as the Common
Language Runtime (CLR), an application virtual machine that provides important services such
as security, memory management, and exception handling. The class library and the CLR
together constitute the .NET Framework.

2. Visual Studio
2.1. Introduction
Home page of Visual Studio: http://www.microsoft.com/visualstudio
There exist different versions of Visual Studio, such as Visual Studio Express (free), Visual
Studio Professional, Visual Studio Premium and Visual Studio Ultimate.

2.2. Getting Started


2.2.1. Integrated Development Environment (IDE)
The Visual Studio product family shares a single integrated development environment (IDE)
that is composed of several elements: The Menu bar, Standard toolbar, various tool
windows docked or auto-hidden on the left, bottom, and right sides, as well as the editor
space. The tool windows, menus, and toolbars available depend on the type of project or file
you are working in.
Below we see the Visual Studio IDE (Integrated Development Environment):
2.2.2. New Project
The first thing you do when you want to create a new application is to create a new project.
This can be done from the Start Page:

Or from the File menu:


Then the “New Project” window appears:

In this window, you will select an appropriate template based on what kind of application
you want to create, and a name and location for your project and solution.
The most common applications are:
• Windows Form Application
• Console Application
• WPF Application
• ASP.NET Web Application
• Silverlight Application
2.2.3. Solution Explorer
Solutions and projects contain items that represent the references, data connections,
folders, and files that you need to create your application. A solution container can contain
multiple projects and a project container typically contains multiple items.

2.2.4. Toolbox
The Toolbox contains all the necessary controls, etc. you need to create your user interface.
See Figure below.
The Toolbox contains all the controls, etc. we can use
in our user interface.
In order to use them in our user interface, we just drag
and drop them to the “Form”, as shown below:
2.2.5. Editors and Designers
Visual Studio has different editors and design tools.
Graphical User Interface Designer:

Code Editor:
2.2.6. Properties window
Each control we have on our user interface has lots of Properties we can set.

This is done in the Properties window:


2.2.7. Build and Debug Tools
In Visual Studio, we have lots of Build and Debugging Tools.
Build menu:
Below we see the Build menu:

The most used tool is “Build Solution” (Shortcut Key: F6).


Debug menu:
Below we see the Debug menu:

The most used tool is “Start Debugging” (Shortcut Key: F5).

Useful links:
Visual Studio: https://docs.microsoft.com/en-us/visualstudio/welcome-to-visual-studio
C#: http://msdn.microsoft.com/en-us/library/kx37x362.aspx

You might also like