문제

How can I set the size of an array via an InputBox(referenced from VisualBasic) in c#?

도움이 되었습니까?

해결책

Do you mean something like this one ?

 var size = Interaction.InputBox("Enter the array size:");
 int arraySize;
 if (int.TryParse(size, out arraySize))
 {
      var myArray = new int[arraySize];
 }
라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top