Check out example codes for "c# enum variable set to nonthing". It will help you in understanding the concepts better.

Code Example 1

An enum is a "value" type in C# (means the the enum is stored as whatever value it is, not as a reference to a place in memory where the value itself is stored). You can't set value types to null (since null is used for reference types only).

That being said you can use the built in Nullable<T> class which wraps value types such that you can set them to null, check if it HasValue and get its actual Value. (Those are both methods on the Nullable<T> objects.

name = "";
Nullable<Color> color = null; //This will work.
There is also a shortcut you can use:

Color? color = null;
That is the same as Nullable<Color>;

Learn ReactJs, React Native from akashmittal.com