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”
Monthly Archives: June 2018
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”
C# – Data Types
Let’s have a quick review what kind of built-in data types in C#. In Brief: string -> alphanumeric (defaults to “”) int -> 2 billion to -2 billion (defaults to 0) double -> fractional value (defaults to 0.0) bool -> true or false (defaults to false) More on this topic: The following explanation has beenContinue reading “C# – Data Types”
Bu, gönderi alıntısıdır.