C# – Arithmetic Operators

Let’s handle today arithmetic operators. I always try to explain as easy as possible. = NOT Not equality, it is assigment Math operators is + – * / Addition assigment total = total + 5; total += 5; Increment operator  i++; Decrement operator i–; Beware of order of precedence (use parenthesis) Beware of down castingContinue reading “C# – Arithmetic Operators”

C# – Casting and Type Conversions

Let’s take today handle ‘Casting and Type Conversations’ in brief. Implicit conversations -> smaller type to larger type without data loss, “upcasting” Explicit conversation -> require developer intervertion, possibly of data loss, “downcasting”, either in the form of cast or using helper method. Casting numbers: Numbers to string: String to numbers: For those of youContinue reading “C# – Casting and Type Conversions”