i am reading boolean value (value would either 1
or 0
) using data reader in ADO.NET
from a table and want to type cast value to SortOrder
(http://msdn.microsoft.com/en-us/library/dscy145f.aspx).
I am getting error if i use Enum.TryParse
method to convert value. Any alternative solution.
SortOrder order;
Enum.TryParse<SortOrder>(bool value);