0
我有一些代碼,我試圖做我的For
循環反向,它似乎並沒有工作ASP.NET反向循環
Session("mysession") = "1234-5678-"
Dim delimiters As Char() = New Char() {"-"C}
Dim mystring As String() = Trim(Session("mysession")).Split(delimiters, StringSplitOptions.RemoveEmptyEntries)
For x = 0 to mystring.Length - 1
'Do Something
Next
這一工程,但它顯示在錯誤的順序I」米試圖通過簡單地做這個
For mystring.Length - 1 to x = 0
扭轉它,但我得到一個錯誤
Expression is a value and therefore cannot be the target of an assignment.
任何想法?
謝謝
或者[`Array.Reverse(mystring)`](http://msdn.microsoft.com/en-us/library/d3877932.aspx)如果你是精神懶惰/之前咖啡套裝。 – 2011-01-26 14:44:12