I'm working with the Umbraco CMS which holds lots of data as strings.
Sometimes I need to compare a stored value string value (which is an int stored as a string) to an enum, but is it best to compare them as strings:
if ( stringValue == ( (int) Enum.Option ).ToString() ){
}
Or to parse and compare as ints:
if ( int.Parse(stringValue) == (int) Enum.Option ){
}
Or does it just not matter either way!