C# – Syntax (Operands & Operators)

Again let’s jump into c# syntax basically and let me show you what you need to know in the beginning. Operands -> variable names, object/server control names, literals – “Nouns”(you name these) Operators – > “Verbs”… they act on operands A detailed explanation could be found in the following taken from microsoft.com In C#, an operator isContinue reading “C# – Syntax (Operands & Operators)”

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”