LeetCode: Divide Array in Sets of K Consecutive Numbers C#
Here's some C# in accordance with my first suggestion of sorting the array and looping.

public bool IsPossibleDivide(int[] nums, int k)
{
    if (nums.Length % k != 0)
    {
        return false;
    }

    var dict = new Dictionary&lt;int, int&gt;();
    foreach (var num in nums)
    {
        if (!dict.TryGetValue(num, out var value))
        {
            value = dict[num] = 0;
        }

        dict[num] = value+1;
    }
    Array.Sort(nums);

    for (int i = 0; i &lt; nums.Length; i++)
    {
        var currVal = nums[i];
        if(dict[currVal] &gt; 0) 
        {
            for(int j = 0; j &lt; k; j++) 
            {
                if(!dict.ContainsKey(currVal + j))
                {
                    return false;
                }
                dict[currVal + j]--;
            }
        }
    }

    return true;
}


This is significantly faster, and is O(nlogn), as I say I think there's a O(n) solution but I'm not really sure of the exact details and I don't know much C#, probably I could write it in JS if you like.

As I say, this                 

int start = dict.FirstOrDefault(x=&gt;x.Value &gt;0).Key;

looks bad to me because once you've done a good number of the consecutive numbers, it might start having to look through a lot of the dict.