vb.net remove first element from array
问题 One answer is to create a new array that is one element shorter. Are there any other simpler ways to do this? 回答1: Here is one way to remove the first element of an array in vb.net. dim a(n) ... for i = 1 to ubound(a) a(i-1) = a(i) next i redim preserve a(ubound(a)-1) You could make a function for this to remove an arbitrary element of an array (Have a parameter for the initial value of the for loop). 回答2: You can use LINQ to produce your result in a very concise bit of code: Dim a2 = a.Skip