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)”
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”
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”
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.