1.遍历枚举中所有的内容
foreach
(
string
str
in
Enum.GetNames(
typeof
(esriSRGeoCS2Type)))
{
listBox1.Items.Add(str);
}
这样的话,就罗列出来esriSRGeoCS2Type下所有的坐标系统:{
listBox1.Items.Add(str);
}
![](https://www.cnblogs.com/images/cnblogs_com/giscafe/ArcGIS%20Engine/esriSRGeoCS2TypeEnum.jpg)
2.将字符串转换为枚举
esriSRGeoCS2Type oneOfesriSRGeoCS2Type
=
(esriSRGeoCS2Type)Enum.Parse(
typeof
(esriSRGeoCS2Type),
"
esriSRGeoCS_S_JTSK_FERRO
"
);