Search This Blog

Monday, December 23, 2013

Parentheses () Operator C# Example

C# > Operators() Operator

Parentheses operator is used for

1. Casting

double a = 4.5;
int b;
a = (int)q; // Cast double to int   

2. Invoke

Method(); // Call method

Note: This operator cannot be overloaded!