> None.
>
[quoted text clipped - 8 lines]
> > Regards
> > Martin- Hide quoted text -- Show quoted text -
No, I am fairly certain the compiler knows to translate one to the other.
> Is there a benefit to using one over the other? I've sometimes found
> myself wondering if I should declare all my int's as Int32's.
[quoted text clipped - 12 lines]
>> > Regards
>> > Martin- Hide quoted text -- Show quoted text -
int is mapped to System.Int32 so other then typing more you won't accomplish
much :)
Regards,
John
> Is there a benefit to using one over the other? I've sometimes found
> myself wondering if I should declare all my int's as Int32's.
[quoted text clipped - 12 lines]
>> > Regards
>> > Martin- Hide quoted text -- Show quoted text -
> Is there a benefit to using one over the other? I've sometimes found
> myself wondering if I should declare all my int's as Int32's.
I use the keyword names in my code for the sake of keyword higlighting
- but for library methods, you should use the type name (eg
Convert.ToInt32) so that it's not tailored to one particular .NET
language.

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
gbgeek - 08 Nov 2006 22:28 GMT
That's sound advice. Is that the reason these aliases exist in C#? To
provide a way to refer to objects in a non-language specific way?
> <gbg...@gmail.com> wrote:
> > Is there a benefit to using one over the other? I've sometimes found
[quoted text clipped - 6 lines]
> Jon Skeet - <s...@pobox.com>http://www.pobox.com/~skeet Blog:http://www.msmvps.com/jon.skeet
> If replying to the group, please do not mail me too
Dave Sexton - 08 Nov 2006 22:28 GMT
Hi Jon,
I do the same for keyword highlighting, but I'm not clear on why I shouldn't
in library methods. Once compiled to CIL, I don't see how it would matter.
Are you suggesting that I use Convert.ToInt32 instead of casting to (int),
even in cases where I know that an explicit cast exists?

Signature
Dave Sexton
>> Is there a benefit to using one over the other? I've sometimes found
>> myself wondering if I should declare all my int's as Int32's.
[quoted text clipped - 3 lines]
> Convert.ToInt32) so that it's not tailored to one particular .NET
> language.
Jon Skeet [C# MVP] - 08 Nov 2006 22:39 GMT
> I do the same for keyword highlighting, but I'm not clear on why I shouldn't
> in library methods. Once compiled to CIL, I don't see how it would matter.
>
> Are you suggesting that I use Convert.ToInt32 instead of casting to (int),
> even in cases where I know that an explicit cast exists?
No, I'm suggesting that you write methods with names of ToInt32 and
ToSingle rather than ToInt and ToFloat. I wasn't talking about
implementation, just naming - sorry to confuse :(

Signature
Jon Skeet - <skeet@pobox.com>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
Dave Sexton - 08 Nov 2006 22:42 GMT
Hi Jon,
Ok, that makes more sense!

Signature
Dave Sexton
>> I do the same for keyword highlighting, but I'm not clear on why I
>> shouldn't
[quoted text clipped - 6 lines]
> ToSingle rather than ToInt and ToFloat. I wasn't talking about
> implementation, just naming - sorry to confuse :(