Some comments on by Inside C# post


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Recently I posted about the magic
the C# compiler is doing… I got some href="http://blogs.gotdotnet.com/BradA/commentview.aspx/0ee02be9-3285-47f3-a4da-b54eb7724869">good
comments.


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> "urn:schemas-microsoft-com:office:office" /> 


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> href="http://weblogs.asp.net/psteele">Patrick Steele – points to href="http://weblogs.asp.net/psteele/story/7717.aspx">some similar work he
did in VB… very cool.


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> 


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> href="mailto:ksummerlinAT%20NOSPAMtetradata%20dot%20com">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. style="mso-spacerun: yes">  I’ll raise it again now that I have a
customer asking as well 😉


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> 


"urn:schemas:contacts" /> style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">Blake face=Arial size=2> style="mso-spacerun: yes"> 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 "urn:schemas-microsoft-com:office:smarttags" /> size=2> style="FONT-SIZE: 10pt; FONT-FAMILY: Arial">CLI face=Arial size=2> specs are
likely the difference between boxed and unboxed value types. style="mso-spacerun: yes"> 
Unboxed value types technically don’t
have any base class.


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> 


style="FONT-SIZE: 10pt; FONT-FAMILY: Arial"> href="http://weblogs.asp.net/jtobler/">John Tobler – points out Lutz’s great
work on Reflector style="mso-spacerun: yes"> Oh yes, I know it. style="mso-spacerun: yes">  href="http://www.aisto.com/roeder/frontier">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.)


 

Comments (3)

  1. Rick Byers says:

    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!

  2. Blake says:

    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

  3. Dave says:

    Reflector is really nice indeed 😉