Programmation Csharp
Programmation Csharp
Willy-joël TCHANA
Software engineer : Software Architect
CEO of Over Soft Solution
Prerequisites
Basics of Csharp language
3 Prerequisites
https://go.microsoft.com/fwlink/?LinkID=799445
Prerequisites
7 The dotnet Framework 4.8
A Framework
.Net Framework 4x
.Net Core 3x
.Net 5
A runtime
8
Prerequisites
IDE Visual Studio latest
VS Installer
h
tps://visualstudio.microsoft.com/fr/thank-you-downloading-visual-studio/?sku
=Community&rel=16
VS 2019 Community
Outlook account
Prerequisites
9
IDE Visual Studio latest: Visual studio installer
Prerequisites
10
IDE Visual Studio latest: VS installer
Prerequisites
11
IDE Visual Studio latest: VS 2019 community
Prerequisites
12
IDE Visual Studio latest: VS 2019 with account
Prerequisites
13 Platform programming language
VB.NET
C++
F#
C#
All this language are oriented programming language
Prerequisites
14 Platform programming language
Basics of Csharp language
15
Syntax
Base data types
Variable declaration
Assignment
Cast
Operators
Conditional instructions
Iterative instructions
Arrays
Functions
Data structures
Conventions
Basics of Csharp language
16 Syntax
using System;
namespace MyCSharpProject
{
class Program
{
/*Like C program,
C# start with execution with main function
*/
static void Main(string[] args)
{
string message = "Hello World!!";
//Print to screen
Console.WriteLine(message);
}
}
}
Basics of Csharp language
17 Base data types: Numbers
Basics of Csharp language
18 Base data types: Strings
int num;
float rate;
decimal amount;
char code;
bool isValid;
string name;
DateTime date;
Basics of Csharp language
22 Assignment
num = 100;
rate = 10.2f;
amount = 100.50M;
char code = 'C';
bool isValid = true;
string name = "Steve";
DateTime date = new DateTime(2020, 12, 31);
Basics of Csharp language
23 Assignment: var keyword
Same to C language
Basics of Csharp language
Conditional instructions
29
Same to C language
Basics of Csharp language
Iterative instructions
30
Same to C language
foreach(int a in myArray)
{
Console.WriteLine(a.ToString());
}
FIN
31
Questions