Is there any way to get some list of all Sql Data Types on c#?
I know that we have a Enum called SQlDbType which contains all Sql Data Types, but can we convert an Enum to an array of strings?
I only want to get some list with all Sql Data Types, instead of writing them one by one and adding them into my array of strings.
Enum to an array of strings is pretty easy:
or using LINQ:
Or more pleasantly using my Unconstrained Melody library, either as an array or (more efficiently) an immutable list: