Greetings All,
i need to convert a functin from vb.net to C#.net here is the vb.net function, when i convert the function using converters i am getting few problems. my main problem is ReDim and ReDim Preserve. these function are not available in C#, how can i convert to C# accordingly. can any body pls provide me a solution. thanks in advance
rCnt = 0
nCols = oReader.FieldCount()
If nStart = 1 And nRows = -1 Thennbegin = 0
bAll =
True ElseIf nStart > 0 And nRows = -1 Thennbegin = nStart - 1
bAll =
True ElseIf (nStart > 0 And nRows > 0) Thennbegin = nStart - 1
nEnd = nbegin + nRows - 1
End If Dim vaArray As New ArrayList While (oReader.Read()) If Not bExit Then If nbegin <= rCnt And (nEnd >= rCnt Or bAll = True) Then Try Dim values(nCols - 1) As ObjectoReader.GetValues(values)
vaArray.Add(values)
Catch ex As ExceptionHandleError(ex, C_CLASS_NAME)
End Try ElseIf ((bAll = False) And (nEnd < rCnt)) ThenbExit =
True End If End IfrCnt = rCnt + 1
End While If Not IsArray(vaResultSet) Then ReDim vaResultSet(0) Else ReDim Preserve vaResultSet(UBound(vaResultSet) + 1) End If Dim vaOut(1)vaOut(0) = vaArray
vaOut(1) = rCnt
vaResultSet(UBound(vaResultSet)) = vaOut
Loop While oReader.NextResult() Catch ex As ExceptionHandleError(ex, C_CLASS_NAME)
End Try Return vaResultSet End Function
Regards
sai