Talk:C Sharp Programming/Data structures

age example
with code like I get Hello World! twice followed by You become a teenager at an age of Teenager. I would have expected 13 instead of Teenager. Have I made an error in my program? Thanks. Sorry about messing up the syntax of the code block, but I can't figure it out -- take a look at the edit source. —The preceding unsigned comment was added by 70.182.153.38 (talk • contribs).


 * That's because  is an enumeration, so   returns the enumeration value's name.  To show the underlying integer (13), use this instead:
 * Rodasmith 19:13, 9 May 2007 (UTC)
 * Rodasmith 19:13, 9 May 2007 (UTC)

Errors in "person" example
There are some mistakes in definition of "person" struct and it's constructor. &mdash;the preceding unsigned comment is by 194.29.160.251 (talk • contribs) 2006-03-06 14:01:47  (UTC)
 * I have corrected the sample. Rodasmith 17:02, 7 March 2006 (UTC)
 * In order for the comparison dana.birthDate < DateTime.Now to work, does the birthDate (field?) need to be declared public? —The preceding unsigned comment was added by 70.182.153.38 (talk • contribs).
 * Yes, you're right. In fact, all the field should be public (or internal) for that sample to compile.  Rodasmith 20:05, 10 May 2007 (UTC)

Missing word
Structs are really only used for performance reasons and/or if you intend to it by value. Intend to what? Verb is missing here!