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);
}
but, the compiler throws an error 'cannot convert to or from a derived
class'
since this is IN Object, how can it be a 'derived' class?
I got really used to testing to objects as...
if( thing )
{
// okay do something with thing.
}
and
if ( !thing )
{
// probably create a thing....
}
--
View this message in context: http://www.nabble.com/Object-additional-implicit-operator.-tp18992151p18992151.html
Sent from the Mono - General mailing list archive at Nabble.com.