I have a Dictionary<string,string[]>
Some example values are
Key1 Value="1","2","3","4","5"
Key2 Value="7","8"
Key3 Value=null
I want to the array length to be the max of all values which in my case is 5 for Key1
so I can get a result as:
Key1 Value="1","2","3","4","5"
Key2 Value="7","8","","",""
Key3 Value="","","","",""
So all Keys have same array length = 5 and the values which didnt exist before are empty values “”.
How can this be done?
Try this