using System.Collections.Generic;
public static void Main()
Dictionary<string, string> testDictionary = new Dictionary<string, string>()
List<string>? result = ConvertToProductAggregatorCodes(testDictionary);
Console.WriteLine("Product Aggregator Codes:");
foreach (string code in result)
Console.WriteLine("The input dictionary is null or empty.");
private static List<string>? ConvertToProductAggregatorCodes(Dictionary<string, string>? listOpExs)
return (listOpExs is null || listOpExs.Count == 0) ? null : new List<string>(listOpExs.Values);