If you want to list azure vm resource sku with C#, please refer to the following steps:
- Create a service principal and assign Contributor role to the sp
az login
#create sp and assign Contributor role at subscription level
az ad sp create-for-rbac -n "your service principal name"

- Code. I use the package
Microsoft.Azure.Management.Fluent
and Microsoft.Azure.Management.ResourceManager.Fluent
string clientId = "<sp appID>";
string clientSecret = "<sp passowrd>";
string tenantId = "";
string subscriptionId = "";
var credentials = SdkContext.AzureCredentialsFactory
.FromServicePrincipal(clientId,
clientSecret,
tenantId,
AzureEnvironment.AzureGlobalCloud);
var azure = Microsoft.Azure.Management.Fluent.Azure
.Configure()
.WithLogLevel(HttpLoggingDelegatingHandler.Level.BodyAndHeaders)
.Authenticate(credentials)
.WithSubscription(subscriptionId);
IPagedCollection<IComputeSku> skus = await azure.ComputeSkus.ListbyRegionAndResourceTypeAsync(Region.AsiaSouthEast, ComputeResourceType.VirtualMachines);
// process data according to your need
//get B-series VMs size
var newSkus =skus.Where(sku => sku.Inner.Family == "standardBSFamily").ToList();
For more details, please refer to the sample and API