.net app.config True vs True

.net app.config True vs True,.net,app-config,visual-studio-2013,.net,App Config,Visual Studio 2013,根据MSDN,以下app.config条目有效: <defaultProxy enabled="false"> <proxy bypassonlocal="true" usesystemdefault="false" /> </defaultProxy> 这些值是否区分大小写?哪一个是正确的?bypassonlocal和usesystemdefault属性不映射到布尔配置属性,而是映射到System.Net.configuration.ProxyElem

根据MSDN,以下app.config条目有效:

<defaultProxy enabled="false">
  <proxy bypassonlocal="true" usesystemdefault="false" />
</defaultProxy>

这些值是否区分大小写?哪一个是正确的?

bypassonlocal和usesystemdefault属性不映射到布尔配置属性,而是映射到System.Net.configuration.ProxyElement+BypassOnLocalValue和System.Net.configuration.ProxyElement+UseSystemDefaultValues枚举的值,其中包括“未指定”以及“True”和“False”

另一方面,defaultProxy元素上的enabled属性是布尔值。出于某种原因,xsd模式过于热情,要求使用小写值,但任何大小写都可以在运行时使用


在任何情况下,我都会坚持模式指示的内容。

bypassonlocal和usesystemdefault属性不会映射到布尔配置属性,而是映射到System.Net.configuration.ProxyElement+BypassOnLocalValues和System.Net.configuration.ProxyElement+UseSystemDefaultValues枚举的值,其中包括“Unspecified”和“True”和“假”

另一方面,defaultProxy元素上的enabled属性是布尔值。出于某种原因,xsd模式过于热情,要求使用小写值,但任何大小写都可以在运行时使用

在任何情况下,我都会坚持模式指示的内容

<defaultProxy enabled="false">
  <proxy bypassonlocal="True" usesystemdefault="False" />
</defaultProxy>