How to treat in C # data coming from a table that is of type bit in sql server?

3

In Visual Studio it will look like this:

alerta.DataHoraCadastro = dr.Get(12);

How do I do this?

    
asked by anonymous 01.12.2016 / 20:03

1 answer

5

In case you will have to convert the information to boolean. It would look like this:

alerta.DataHoraCadastro = dr.GetBoolean(12);
    
01.12.2016 / 20:14