I'm new to enum.
I've got this enum:
public enum Categories
{
Animals,
Animations,
Accessories,
Apearance,
Clothing,
Gadgets,
Land,
Scripts,
Vehicles,
Weapons,
Other
}
Then I have this variable: private Categories Category;
I'm trying to parse user input (string) so that Category will be equal to the right enum.
this.Category = Enum.Parse(Categories ,cat);
And I get this Error:
'Product.Categories' is a 'type' but is used like a 'variable'
I hope you understand what I'm trying to say.