why dbtype int32 is the same as int64 hier

381 Views Asked by At

Please, I want to know why the question has the answer false.

The question I want to be answered

1

There are 1 best solutions below

1
On

The answer is false because there is no case DbType.Int64 anywhere in that code, so the default: return null inside the switch is used.

I'll add that the DbType is an enum... If we look at its values (the link is to its source code), we will see that DbType.Int64 == 12, and that there are no other enum constants with value 12, so there can't even be the case of, for example, DbType.Int64 == 12 == DbType.Int32, because there is NO other enum constant with value 12.

Code sample: http://rextester.com/BSUP55337 and https://dotnetfiddle.net/dHOrNM .

The three correct responses are No, Yes, No.