Design issue: Struct vs. Class

Tech Tip: Click here to run a free scan for Windows Errors and optimize PC performance



After reading the thread "Struct faster than class?" I thought I should surely understand if I am doing anything wrong in my work.
 
First, Jon you are very professional. Excellent. I will wish you as my mentor.
 
Anyways, getting to my question --
 
I am in need of enums a lot in my project. More for meta data reasons. e.g. Toggle -on/off, Close/Open etc.
Most are int type values but this one meta data is full of Guid. Now that enum supports int etc and not string or Guid so I endup making it a Struct. No perticular reason, just to make it look different while programming (as there are tons of classes to keep track of). Anyways, I am not sure if this approch is better (or even ok). Not being familier with memory management etc (and will love to get pointers to read more on this also) I am not sure how things are handled run time if it is changed to static Class type. I have so many questions on this topic alone so please feel free to throw anything on this side.
 
Thanks,
Po


Relevant Pages

  • Re: How to handle PK field using Int datatype when moved to a new serv
    ... fragmentation etc. // ... stick with bigint (unless int satisfies your requirements then ... stick with int) unless you have a reason to go to GUID. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.programming)
  • Re: How to handle PK field using Int datatype when moved to a new serv
    ... And it has helped with bulk inserts tremendously because of the lack of fragmentation. ... stick with bigint unless you have a reason to go to GUID. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.programming)
  • Re: GUID or INT as PK
    ... I usually use ints as primary keys for two reasons: ... It is reasonable to believe that the database engine will work out an ... the GUID column and index it, but one also has to think about key migration. ... the int approach. ...
    (microsoft.public.sqlserver.ce)
  • Re: How to handle PK field using Int datatype when moved to a new serv
    ... stick with bigint unless you have a reason to go to GUID. ... Erland Sommarskog, SQL Server MVP, esquel@xxxxxxxxxxxxx ...
    (microsoft.public.sqlserver.programming)
  • Re: Custom/Named MAPI Properties
    ... The whole point of named properties is that you hardcode a GUID and a name ... name/ (int or string) are hard-coded to the values I mentioned. ...
    (microsoft.public.win32.programmer.messaging)