using System.Collections.Generic;
public static void Main()
string dropdownCurrency = "GBP";
double withdrawAmount = 10.0;
Dictionary<string, double> netLiquidatingValues = new Dictionary<string, double>()
Dictionary<string, double> exchangePairs = new Dictionary<string, double>()
foreach (KeyValuePair<string, double> kvp in netLiquidatingValues)
double tempVal = kvp.Value;
if (dropdownCurrency != kvp.Key && exchangePairs.ContainsKey(kvp.Key))
tempVal *= exchangePairs[kvp.Key];
if (dropdownCurrency != "USD" && exchangePairs.ContainsKey(dropdownCurrency))
tempVal /= exchangePairs[dropdownCurrency];
Console.WriteLine("Requested amount is: " + withdrawAmount.ToString("0.##") + " " + dropdownCurrency);
Console.WriteLine("Total NLV is: " + sumNlv.ToString("0.##") + " " + dropdownCurrency);
Console.WriteLine("Withdrawal is " + (sumNlv >= withdrawAmount ? "successful" : "failed"));