Programming Language: Visual C#

You might also like

Download as pdf or txt
Download as pdf or txt
You are on page 1of 15

Visual C#

Programming
Language

JAMES BRIAN FLORES


Instructor
Nowadays computers have become irreplaceable.
We use them to solve complex problems at the
workplace, look for driving directions, have fun and
communicate. They have countless applications in
the business world, the entertainment industry,
telecommunications and finance.
It’s not an overstatement to say that computers
build the neural system of our contemporary society
and it is difficult to imagine its existence without
them.
Despite the fact that computers are so wide-
spread, few people know how they really work.
In reality, it is not the computers, but the
programs (the software), which run on them, that
matter. It is the software that makes computers
valuable to the end-user, allowing for many
different types of services that change our lives.
The Essence of Programming
The essence of programming is to control the work of
the computer on all levels. This is done with the help of
"orders" and "commands" from the programmer, also
known as programming instructions.
To "program" means to organize the work of the
computer through sequences of instructions. These
commands (instructions) are given in written form and
are implicitly followed by the computer (respectively by
the operating system, the CPU and the peripheral
devices).
The Essence of Programming
Programmers are the people who create these
instructions, which control computers. These instructions are
called programs. Numerous programs exist, and they are
created using different kinds of programming languages.
Each language is oriented towards controlling the
computer on a different level. There are languages oriented
towards the machine level (the lowest) – Assembler for
example. Others are most useful at the system level
(interacting with the operating system), like C. There are also
high level languages used to create application programs. Such
languages include C#, Java, C++, PHP, Visual Basic, Python,
Ruby, Perl, JavaScript and others.
What is a Programming Language?

A programming language acts as a translator between you


and the computer. Rather than learning the computer's
native language (known as machine language), you can
use a programming language to instruct the computer in a
way that is easier to learn and understand.

A specialized program known as a compiler takes the


instructions written in the programming language and
converts them to machine language.
C# Language Overview

 Microsoft C# (pronounced C sharp) is a modern,


general-purpose object oriented programming language
developed by Microsoft.
 C# was developed by Anders Hejlsberg and his team
during the development of .Net Framework.
 C# is designed for Common Language Infrastructure (CLI),
which consists of the executable code and runtime
environment that allows use of various high-level
languages to be used on different computer platforms and
architectures.
Visual C# Language

Visual C# .NET is Microsoft's C# development tool.


It includes an interactive development environment, visual
designers for building Windows and Web applications, a
compiler, and a debugger. Visual C# .NET is part of a suite
of products, called Visual Studio .NET, that also includes
Visual Basic .NET, Visual C++ .NET, and the JScript
scripting language. All of these languages provide access to
the Microsoft .NET Framework, which includes a common
execution engine and a rich class library.
Getting Started with C#

Understand the basic structure of a C# program.

Obtain a basic familiarization of what a Namespace" is.

Obtain a basic understanding of what a Class is.

Learn what a Main method does.


Basic Structure of C# Program

1 2 3 4
Basic Structure of C# Program

using is a keyword, highlighted with blue by the editor.


The using keyword imports a namespace in the program.
A program generally has multiple using statements.
Basic Structure of C# Program

This is the namespace declaration.

A namespace is a collection of classes.

“The namespace ConsoleApplication1 is now the main namespace


for this application, and new classes will be a part of it by default.”
Basic Structure of C# Program

• Next, we define our class. Since C# is truly an Object


Oriented language, every line of code that actually does
something, is wrapped inside a class. In the case, the class
is simply called Program:

 We can have more classes, even in the same file. For


now, we only need one class. A class can contain several
variables, properties and methods, concepts we will go
deeper into later on. For now, all you need to know is
that our current class only contains one method and
nothing else. It's declared like this:
Basic Structure of C# Program

The next line defines the Main method, which


is the entry point for all C# programs. The Main
method states what the class will do when executed.
Its worth to note the following points:

 C# is case sensitive.
 All statements and expression must end with a
 semicolon (;).
 The program execution starts at the Main method.

You might also like