Skip to content

Instantly share code, notes, and snippets.

@cwg999
Created June 7, 2019 18:08
Show Gist options
  • Save cwg999/f7f6b172de0aff0bfadf9018be4b0f49 to your computer and use it in GitHub Desktop.
Save cwg999/f7f6b172de0aff0bfadf9018be4b0f49 to your computer and use it in GitHub Desktop.
How to use some tuples with an Enum object!
for (int i = 0; i < insertDataTables.Count(); i++)
{
List<(CurrencyIsoCode currency, bool useZero)> currencies = new List<(CurrencyIsoCode, bool)>{
(CurrencyIsoCode.EUR,true),
(CurrencyIsoCode.USD,true),
(CurrencyIsoCode.CAD,true),
(CurrencyIsoCode.MXN,true),
(CurrencyIsoCode.BRL,true),
(CurrencyIsoCode.COP,true),
};
for (int j = 0; j < currencies.Count; j++)
{
await BatchPriceBookUpdates(insertDataTables.ElementAt(i), updateDataTables.ElementAt(i), product2dict,
PriceBook.Standard,
currencies[j].currency
) ;
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment