What is operators in C# and how many types of operators are there in c#?

 Posted by Raja on 4/5/2009 | Category: C# Interview questions | Views: 8616
Answer:

C# has a large set of operators, which are symbols that specify which operations to perform in an expression.

Arithmetic
+ - * / %

Logical (boolean and bitwise)
& | ^ ! ~ && || true false

String concatenation
+

Increment, decrement
++ --

Shift
<< >>

Relational
== != < > <= >=

Assignment
= += -= *= /= %= &= |= ^= <<= >>=

Member access
.

Indexing
[]

Cast
()

Conditional
?:

Delegate concatenation and removal
+ -

Object creation
new

Type information
as is sizeof typeof

Overflow exception control
checked unchecked

Indirection and Address
* -> [] &

For more details visit http://msdn.microsoft.com/en-us/library/6a71f45d(VS.71).aspx


Asked In: Many Interviews | Alert Moderator 

Comments or Responses

Login to post response