简体   繁体   中英

why dbtype int32 is the same as int64 hier

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

我想回答的问题

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.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM