Operators in C#.NET



Operator category
Operators
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
*   ->   []   &

Escape Sequences :-

Escape Sequence
Represents
\a
Bell (alert)
\b
Backspace
\f
Formfeed
\n
New line
\r
Carriage return
\t
Horizontal tab
\v
Vertical tab
\'
Single quotation mark
\ "
Double quotation mark
\\
Backslash
\?
Literal question mark
\ ooo
ASCII character in octal notation
\x hh
ASCII character in hexadecimal notation
\x hhhh
Unicode character in hexadecimal notation if this escape sequence is used in a wide-character constant or a Unicode string literal.
For example, WCHAR f = L'\x4e00' or WCHAR b[] = L"The Chinese character for one is \x4e00".




No comments:

Post a Comment