如何获取C#中的Azure区域列表? [英] How can I get the list of Azure Regions in C#?

查看:119
本文介绍了如何获取C#中的Azure区域列表?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

Azure SDK for Java具有包含所有Azure位置(公共和国家/地区)的枚举.

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

C#是否具有类似的功能?比使用字符串更干净.

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

推荐答案

C#是否具有类似的功能?

Is there similar functionality available for C#?

是的,请参阅 Microsoft.Azure.Management.ResourceManager.流利,我们可以得到

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

演示代码:

string region = Region.AsiaEast.ToString();

这篇关于如何获取C#中的Azure区域列表?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆