How do you interate the DbType enum?

  • Thread starter Thread starter Nick Weekes
  • Start date Start date
N

Nick Weekes

Probably a very dumb question, but how do you count the members of
DbType?
 
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 :-/
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top