Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Bad practice. Or Not ?
Message
 
 
General information
Forum:
ASP.NET
Category:
Class design
Environment versions
Environment:
C# 4.0
Miscellaneous
Thread ID:
01492859
Message ID:
01492875
Views:
56
>Hi,
>Given:
public class A {}
>public class B
>{
>    public static implicit operator B(A a) { return new B(); }
>    public static implicit operator C(B b) { return new C(); }
>}
>public class C {}
Would you find a statement like this too opaque:
C c = (B)new A();
Seems authentically C to me ;-)

You may have read the C++ Journal some years ago. The back page was a monthly column called Obfuscated C, in which valid C/C++ code was printed and readers were invited to decipher exactly what it did.

Mostly joking there. I find C# a lot more accessible than the older dialects and pleasant enough to work with. (My image of K&R C was a bunch of bearded guys in sandals who didn't necessarily want you to understand the code). And now with some downtime (hopefully not much of it) I have the opportunity to return to my studies. Haven't quite decided but trending toward a focus on ASP.NET / C#.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform