积极答复者
关于数组的问题

问题
答案
-
你这里是打算用顺序表描述队列,这样好了。
Public Sub Test() Dim data() As Integer = New Integer() {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} Array.Copy(data, 2, data, 1, data.Length - 2) Array.Clear(data, data.Length - 1, 1) For Each c In data Console.WriteLine(c) Next End Sub
2011 c# mvp China- 已标记为答案 酷.睿 2011年1月26日 6:48
全部回复
-
你好,
你可以用循环来实现。
Dim a(10) As Integer
For i =1 To 8
a(i) = a(i + 1)
Next
Best regards
Liliane Teng [MSFT]
MSDN Community Support | Feedback to us
Get or Request Code Sample from Microsoft
Please remember to mark the replies as answers if they help and unmark them if they provide no help.
-
你这里是打算用顺序表描述队列,这样好了。
Public Sub Test() Dim data() As Integer = New Integer() {1, 2, 3, 4, 5, 6, 7, 8, 9, 10} Array.Copy(data, 2, data, 1, data.Length - 2) Array.Clear(data, data.Length - 1, 1) For Each c In data Console.WriteLine(c) Next End Sub
2011 c# mvp China- 已标记为答案 酷.睿 2011年1月26日 6:48