如何在 C# 中获取 Azure 区域列表?
How can I get the list of Azure Regions in C#?
Java 的 Azure SDK 有 an enum 所有 Azure 位置,public 和国家。
是否有适用于 C# 的类似功能?它会比使用字符串更干净。
Is there similar functionality available for C#?
是的,请参考github中的Microsoft.Azure.Management.ResourceManager.Fluent, we could get source code。更多详情请参考截图
演示代码:
string region = Region.AsiaEast.ToString();
Java 的 Azure SDK 有 an enum 所有 Azure 位置,public 和国家。
是否有适用于 C# 的类似功能?它会比使用字符串更干净。
Is there similar functionality available for C#?
是的,请参考github中的Microsoft.Azure.Management.ResourceManager.Fluent, we could get source code。更多详情请参考截图
演示代码:
string region = Region.AsiaEast.ToString();