[Mono-dev] Coding guidelines nitpicks

Andreas Färber andreas.faerber at web.de
Sat May 30 11:18:06 EDT 2009


Hello,

Am 30.05.2009 um 17:03 schrieb Andrés G. Aragoneses:

> Miguel de Icaza wrote:
>>
>>> 1) Casting: which one is correct?
>>>
>>> a)
>>>
>>> x = ((int)GetPropertyValue ()).ToString ();
>>>
>>> b)
>>>
>>> x = ((int) GetPropertyValue ()).ToString ();
>>
>> No strong opinion on the space after the cast.
>
> Any other opinions on casts?

Personally, I use both depending on context:

X x = (X) y; // note the symmetry

((X)y).ToString (); // the one after doesn't have a space either

Andreas



More information about the Mono-devel-list mailing list