简体   繁体   English

为什么dbtype int32与int64 hier相同

[英]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. 答案是false因为在该代码中的任何地方都没有case DbType.Int64 ,因此使用default: return nullswitch内部default: return null

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. 我将添加DbType是一个enum ...如果我们查看它的值(链接是它的源代码),我们将看到DbType.Int64 == 12 ,并且没有其他枚举常量值12,所以甚至不能有例如DbType.Int64 == 12 == DbType.Int32 ,因为没有其他值为12的枚举常量。

Code sample: http://rextester.com/BSUP55337 and https://dotnetfiddle.net/dHOrNM . 代码示例: http//rextester.com/BSUP55337https://dotnetfiddle.net/dHOrNM

The three correct responses are No, Yes, No. 三个正确答案是否,是,否。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

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