What is Variable? A variable is something you want the computer to remember while your program is running. Computer programs need...
Tag - #code
Code Examples
Comments are only for you to read, not for the computer to execute. All the comments displayed in the Code Editor are green by...
if statements ( selection structure ) With if statement, you can tell the computer to make a choice by evaluating a Boolean...
Switch-Case ( case structure ) The switch statement is a control statement, which is different from if statement because it...
In C#, assignment operators are used to assign a new value to a variable. This operator simply assigns whatever value is on the...
The while loop repeatedly executes a block of code inside the loop while the given logical expression is true else it breaks...
The do-while loop is a variant of the while loop except one main difference, it will always execute the loop body at least once...
Expressions Expressions can be transformed by combining operators with one or more variables (operands) and literal values. Run...
Logical operators, also called Boolean operators, accept two bool values and return a Boolean result (true or false). Boolean...
Relational operators, also called comparison operators, are used to compare two or more values (operands) and always return...
Arithmetic operators in C# are the same ones you use on numeric values in math to perform mathematical operations such as...
The for loop executes a block of code repeatedly until the condition is false. This type of loop is useful when the number of...
The foreach loop provides simple syntax to cycle through all the elements in an array or collection, unless you explicitly end...
There is another jump statement called goto statement, which enables you to jump directly to another specified line in the...