[Mono-list] Object additional implicit operator.

Chris Howie cdhowie at gmail.com
Thu Aug 14 22:04:41 EDT 2008

On Thu, Aug 14, 2008 at 8:59 PM, d3x0r <d3ck0r at gmail.com> wrote:
> Since this is open source, I was going to patch my own copy to add an
> extension to 'Object'.
> public static implicit operator bool( Object o ) {
>  return (o!=null);
> }


> I got really used to testing to objects as...

I got used to storing random properties on objects in Perl, but I'm
not hacking the runtime so I can do that in C# too.  :)

The best thing would be to unlearn this habit, not modify Mono to
conform to your coding style.  You're going to be writing invalid C#
with it.

Chris Howie

More information about the Mono-list mailing list