filmov
tv
C# Programming Tutorial 3 - Arithmetic and assignment operators

Показать описание
'Operators are symbols that are used to perform operations on data. The range of different operations you can perform can usually be placed in these four categories: Arithmetic operators, Assignment operators, Equality operators, and Logical operators.
In this tutorial we will look at arithmetic and assignment operators used in the C# language. Later on in these tutorials we will also look at equality and logical operators when we work with conditional statements.
Arithmetic operators are used for performing standard math operations on variables and are usually only used on number variables eg. int and float (although they can be used for other things too eg. the + operator can be used to join two strings together).
Assignment operators are used to assign a value to a variable. The most frequently used assignment operator is the equals (=) sign. There are other operators as well that are used to combine multiple operations into one.