[Solved] Switch vs dictionary with double keys
Your business logic is a bit unclear, but in regards to the Dictionary object initialization/performance issue, the solution below may serve as a valid alternative. Pertinent to your use-case, you can declare Dictionary<double, int> as shown in the following sample C# code snippet: public static Dictionary<double, int> SampleDictionary =new Dictionary<double, int> { { 3.1, 3}, … Read more