c# Leaner way of initializing int array

前端 未结 4 1513
南方客
南方客 2021-01-20 14:50

Having the following code is there a leaner way of initializing the array from 1 to the number especified by a variable?

int nums=5;
int[] array= new int[num         


        
4条回答
提交回复
热议问题