How to set array length in c# dynamically

InputProperty[] ip = new InputProperty[nvPairs.Length]; Or, you can use a list like so: List<InputProperty> list = new List<InputProperty>(); InputProperty ip = new (..); list.Add(ip); update.items = list.ToArray(); Another thing I’d like to point out, in C# you can delcare your int variable use in a for loop right inside the loop: for(int i = 0; … Read more