How do you interate the DbType enum?

  • Thread starter Thread starter Nick Weekes
  • Start date Start date
One way to do this, I am not saying that there aren't any other maybe better
ways:

using System;
using System.Data;

namespace ConsoleApplication13
{
class Class1
{
[STAThread]
static void Main(string[] args)
{
Console.WriteLine(Enum.GetValues(typeof(System.Data.DbType)).GetLength(0));
Console.Read();
}
}
}

Gabriel Lozano-Morán
 
Thanks Gabriel...seems obvious when you think about it, but it had been
a long day :-/
 
Back
Top