Y
yoshitha
Hi
in C#.net what is the equivalent function or anything for Redim preserve
statement
or can any one tell me the equivalent code for follwoing vb.net code.
(db is the object for database.vb class )
If DB.Run("Select * from TestInfo") Then
i = 0
While DB.Result.Read
ReDim Preserve iTestIDs(i)
strTestID = DB.Result("TestID")
iTestIDs(i) = Val(strTestID.Substring(5))
i = i + 1
End While
finalVal = (UserFunctions.MaxOf(iTestIDs) + 1)
and for the follwoing function
Shared Function MaxOf(ByVal Num() As Integer) As Integer
Dim temp As Integer
Dim i As Integer
If Num.Length > 1 Then
For i = 0 To UBound(Num) - 1
If Num(i) > Num(i + 1) Then
temp = Num(i)
Num(i) = Num(i + 1)
Num(i + 1) = temp
End If
Next
Return Num(UBound(Num))
Else
Return Num(0)
End If
End Function
plz can anybody help me i'm very new to c#.net.
thanks
Jyothi
in C#.net what is the equivalent function or anything for Redim preserve
statement
or can any one tell me the equivalent code for follwoing vb.net code.
(db is the object for database.vb class )
If DB.Run("Select * from TestInfo") Then
i = 0
While DB.Result.Read
ReDim Preserve iTestIDs(i)
strTestID = DB.Result("TestID")
iTestIDs(i) = Val(strTestID.Substring(5))
i = i + 1
End While
finalVal = (UserFunctions.MaxOf(iTestIDs) + 1)
and for the follwoing function
Shared Function MaxOf(ByVal Num() As Integer) As Integer
Dim temp As Integer
Dim i As Integer
If Num.Length > 1 Then
For i = 0 To UBound(Num) - 1
If Num(i) > Num(i + 1) Then
temp = Num(i)
Num(i) = Num(i + 1)
Num(i + 1) = temp
End If
Next
Return Num(UBound(Num))
Else
Return Num(0)
End If
End Function
plz can anybody help me i'm very new to c#.net.
thanks
Jyothi