Re: implicit cast operator funny-ness
- From: Jon Skeet [C# MVP] <skeet@xxxxxxxxx>
- Date: Sat, 1 Apr 2006 19:10:13 +0100
Nicholas Paldino [.NET/C# MVP] <mvp@xxxxxxxxxxxxxxxxxxxxxxxxxxx> wrote:
This is more a comment on the use of an implicit cast operator to
perform this conversion. I would advise against it. It will cause the code
to be difficult to read. If anything, make it an explicit cast operator, or
better yet, have a method which will do it for you. Your code will be much
easier to maintain as a result.
I'd certainly agree with this - I've never really liked implicit
conversions, personally...
--
Jon Skeet - <skeet@xxxxxxxxx>
http://www.pobox.com/~skeet Blog: http://www.msmvps.com/jon.skeet
If replying to the group, please do not mail me too
.
- Follow-Ups:
- Re: implicit cast operator funny-ness
- From: Pieter Breed
- Re: implicit cast operator funny-ness
- References:
- implicit cast operator funny-ness
- From: Pieter Breed
- Re: implicit cast operator funny-ness
- From: Nicholas Paldino [.NET/C# MVP]
- implicit cast operator funny-ness
- Prev by Date: Re: C# Fundamentals Part 3: ReferenceEquals question
- Next by Date: Re: Hide selected row in DataGridView
- Previous by thread: Re: implicit cast operator funny-ness
- Next by thread: Re: implicit cast operator funny-ness
- Index(es):
Loading