TechArena Community

TechArena Community (http://forums.techarena.in/)
-   Software Development (http://forums.techarena.in/software-development/)
-   -   Want info on C# Operators (http://forums.techarena.in/software-development/1065148.htm)

ashwinK 03-11-2008 02:17 PM

Want info on C# Operators
 
Hello friends,

I want some information about C# Operators. I just start learning C#.

Thanks

Bosko 03-11-2008 02:26 PM

C# Operators
 
C# provides a large set of operators, which are symbols that specify which operations to perform in an expression. C# predefines the usual arithmetic and logical operators, as well as a variety of others as shown in the following table.

Arithmetic + - * / %

The arithmetic operators (+, -, *, /) can produce results that are outside the range of possible values for the numeric type involved.
Integer arithmetic overflow either throws an OverflowException or discards the most significant bits of the result (see below). Integer division by zero always throws a DivideByZeroException.

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

String concatenation +

Increment, decrement ++ --

Shift << >>

Relational == != < > <= >=

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

Indexing []

Cast ()

Conditional ?:

Sumit21 03-11-2008 02:31 PM

Re: Want info on C# Operators
 
Most operators are either unary or binary. Unary operators form expressions on a single variable, but binary operators form expressions with two variables.


All times are GMT +5.5. The time now is 08:40 AM.