DEV Community

Fawole Ajibola Lukman
Fawole Ajibola Lukman

Posted on

Day 2 of Learning C#

String Concatenation

String concatenation allows you to combine smaller literal strings and variables into a single string.

String concatenation in C#


What is String Interpolation

An interpolation expression is written inside curly braces { }, and the string must be prefixed with the $ symbol.

String interpolation in C#


Casting in C#

Casting is a type of data conversion that tells the compiler to temporarily treat a value as another data type.

Casting example in C#


Order of Operations

Just like we use BODMAS in mathematics, C# follows an order of operations known as PEMDAS:
Parentheses
Exponents
Multiplication
Division
Addition
Subtraction

Order of Operations in C#

Top comments (0)