Answers for "give array size by int c#"

C#
0

c# increase length of array

int[] myArray = { 1, 2, 3 };
Array.Resize(ref myArray, 5);
Posted by: Guest on November-05-2021
0

c# int array length

// Make an int array
int[] myIntArray;

// Put stuff inside it
myIntArray = new int[] { 0, 1, 10, 300, 5000 };

// Print out the length (How many numbers are in myIntArray)
Console.WriteLine(myIntArray.Length);
Posted by: Guest on January-14-2022

C# Answers by Framework

Browse Popular Code Answers by Language