Hi - Simple answer:
Don't use a struct when not appropiate - use a reference type - so your
emp
struct should be a class if you want to change the values like this.
Rule of Thumb: Never use structs (or read the longer explaination with the same conclusion
http://msdn.microsoft.com/en-us/library/ms173109.aspx[
^]
OT: Btw
emp
is not a very good type name - type names should be written uppercase, no abbreviations etc. - I think it's a good idea to go for "common" standards, though personal ones are better than nothing...
http://msdn.microsoft.com/en-us/library/ms229042.aspx[
^]
Kind regards,
Johannes