i would say to use an enum when you would struct something like ItemInfo/UserData
and use Get/Set methods to control the variables as you wish... doing this way you would prevent an major error doing a mistake or something like while ur coding...
example:
Code:
class UserData
{
private uint uiId;
private string szName;
public const int MAX_LEVEL = 140;//ex to use a const
enum EntityVariable { Id, Name }//ex to use a enum
public uint GetInt(EntityVariable evObject)
{
switch (evObject)
{
case EntityVariable.Id:
return uiId;
}
}
public string GetStr(EntityVariable evObject)
{
switch (evObject)
{
case EntityVariable.Name:
return szName;
}
}
public void SetStr(EntityVariable evObject, string szValue)
{
switch (evObject)
{
case EntityVariable.Name:
szName = szValue;
//TODO: Actions after change name here
break;
}
}
}