Some comments on by Inside C# post

Recently I posted about the magic the C# compiler is doing… I got some good comments.

 

Patrick Steele – points to some similar work he did in VB… very cool.

 

Kelly Summerlin, I have pushed in the past for the compilers\IDEs to make better use of the FlagsAttribute, I think there is a lot they could do.  I’ll raise it again now that I have a customer asking as well ;-)

 

Blake  Isn’t sure my statement about Enums have the base class System.Enum is right… Well… the metadata don’t lie…Check it out in ILDASM yourself.  Some of the confusion in the C# and CLI specs are likely the difference between boxed and unboxed value types.  Unboxed value types technically don’t have any base class.

 

John Tobler – points out Lutz’s great work on Reflector Oh yes, I know it.  Lutz was just in my office the other day talking about the fun he is having with it…. Great tool, very helpful in understanding the platform.  BTW, you should ask Lutz about the cool tool he is working on for MS, a little different than Reflector, but very jazzy! (Oh, he is likely to pull a Scoble on you and not talk about it until after the PDC in Oct, but don’t hurt to ask.)

 

Published 06 July 03 09:59 by BradA
Filed under:

Comments

# Rick Byers said on July 7, 2003 12:58 PM:
A great in-depth explanation of the value-type and base-classes issue is at http://blogs.gotdotnet.com/cbrumme/permalink.aspx/9ebaca4e-411a-4033-8bdd-90031c40cd43 Keep up the great work Brad!
# Blake said on July 7, 2003 2:43 PM:
Brad writes: Blake Isn’t sure my statement about Enums have the base class System.Enum is right… But what I actually said was wrong was your assertion that "structs can have base class other than ValueType" and I stand by that 100%. Yes, of course enums derive from System.Enum. A struct on the other hand is a C# language feature, not a CLR feature. And a struct can not have any base type other than the implicit base of ValueType that the compiler generates. Try it if you don't believe me. The fact that C# enums are value types does not mean that they are structs. They are CLR value types but that does not make them structs anymore than a C# double is a struct. Please don't mix and match language keywords and CLR types. A better discussion of value types, including enums, is at http://blogs.gotdotnet.com/cbrumme/permalink.aspx/9ebaca4e-411a-4033-8bdd-90031c40cd43
# Dave said on July 9, 2003 11:52 AM:
Reflector is really nice indeed ;-)
New Comments to this post are disabled

Search

Go

This Blog

Syndication

Page view tracker