我的Web.config
文件中有以下部分:
<configSections>
<section name="mySection" type="myNameSpace, myProject"/>
</configSections>
<mySection>
<city id="ny" type="nameSpace1" />
<city id="dc" type="nameSpace2" />
<city id="nj" type="nameSpace3" />
</mySection>
我需要编写循环遍历cities
给定的代码id
并返回type
.
IE
if the given id = "ny" --> return nameSpace1
if the given id = "dc" --> return nameSpace2
if the given id = "nj" --> return nameSpace3