What Is an Operator?and types of operator in C#?
Answer:
Operators allow processing of primitive data types and objects. They take as an input one or more operands and return some value as a result. Operators in C# are special characters (such as "+", ".", "^", etc.) and they perform transformations on one, two or three operands. Examples of operators in C# are the signs for adding, subtracting, multiplication and division from math (+, -, *, /) and the operations they perform on the integers and the real numbers.
Operators in C#
Operators in C# can be separated in several different categories:
- Arithmetic operators – they are used to perform simple mathematical operations.
- Assignment operators – allow assigning values to variables.
- Comparison operators – allow comparison of two literals and/or variables.
- Logical operators – operators that work with Boolean data types and Boolean expressions.
- Binary operators – used to perform operations on the binary representation of numerical data.
- Type conversion operators – allow conversion of data from one type to another.
- Comparison operators – allow comparison of two literals and/or variables.
- Logical operators – operators that work with Boolean data types and Boolean expressions.
- Binary operators – used to perform operations on the binary representation of numerical data.
- Type conversion operators – allow conversion of data from one type to another.
No comments:
Post a Comment