- Trending Categories
- Data Structure
- Operating System
- C Programming
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Operators, Types and Variables in C#
Variables in C#
A variable is a name given to a storage area that our programs can manipulate. Each variable in C# has a specific type, which determines the size and layout of the variable's memory the range of values that can be stored within that memory and the set of operations that can be applied to the variable.
Types in C#
The variables in C#, are categorized into the following types: Value, Reference and Pointer types.
Value type variables can be assigned a value directly. They are derived from the class system.ValueType.
The reference types do not contain the actual data stored in a variable, but they contain a reference to the variables.
Using multiple variables, the reference types can refer to a memory location. If the data in the memory location is changed by one of the variables, the other variable automatically reflects this change in value. Example of built-in reference types are: object, dynamic, and string.
Pointer type variables store the memory address of another type.
Operators in C#
An operator is a symbol that tells the compiler to perform specific mathematical or logical manipulations.
The following are the operators −
- Arithmetic Operators
- Relational Operators
- Logical Operators
- Bitwise Operators
- Assignment Operators
- Java variables and data types
- What are variables and types of variables in C++?
- Variables, their types, and Scope in C++
- Types of Join and Set Operators in SQL
- Different types of operators in C++
- What are different Identity operators types in Python?
- What are different assignment operators types in Python?
- What are different bitwise operators types in Python?
- # and ## Operators in C ?
- What are class variables, instance variables and local variables in Java?
- Equality Operators: == and != in C++
- What are local variables and global variables in C++?
- Explain and contrast value types and reference types in C#