How can I get the list of Azure Regions in C#?

余生颓废 提交于 2020-07-23 18:06:50

问题


The Azure SDK for Java has an enum with all of the Azure locations, public and national.

Is there similar functionality available for C#? It would be cleaner than using strings.


回答1:


Is there similar functionality available for C#?

Yes, please refer to Microsoft.Azure.Management.ResourceManager.Fluent, we could get source code from github. More details please refer to screenshot.

demo code:

string region = Region.AsiaEast.ToString();



来源:https://stackoverflow.com/questions/44770406/how-can-i-get-the-list-of-azure-regions-in-c

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!