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

C#

Basics

By Lusine Hovsepyan
CREATING AND UNDERSTANDING OUR FIRST C# PROGRAM

Download Visual Studio


https://visualstudio.microsoft.com/

Creating and understanding our first c# program


How to create your project
Creating first Console Application
Common syntax errors
What is the entry point of Console App

Understanding your first C# program


What is .Net Framework
What are the components of .Net Framework

Working with code files, projects and solutions


.NET PROGRAM COMPILATION PROCESS
WHAT IS CONSOLE APPLICATION?

Console Application is an application that takes inputs and displays output at a


command-line console .
CONSOLE.WRITELINE() VS CONSOLE.WRITE()

Console is the class of .Net framework,


WriteLine() method that is used to print text.

WriteLine() prints the output on a new line each time.


Write() prints on the same line
EXAMPLES - CONSOLE

Printing String using WriteLine()


Print your Name and Surname in the same line, Age, Profession in the separate lines,
Gender and Birth date in the same line. Each row must be separated with long "--------".
Use Console.WriteLine()/Write() to print int literals.
Combine (Concatenate) two strings using + operator and print them.
Print sum of '15+2456'.
Print some string and set console's background color into Red.
Print some string and set console's foreground color into Yellow.
Print some string and set console's Title to "Welcome to Console App".

You might also like