Bhupendra,
   try this VB6 code, you will need to change to C# or VB dot net
It only does the Locate without the sorting options

Public Function Locate(ByVal FindValue As String, ByVal sLookIn As String) As Integer On Error GoTo LocalError ' simulate a basic locate on sLookIn on a zero based array

Dim sPos As Integer
Dim sNewArray() As String
Dim sTest As String, sNewTest As String

Locate = -1 ' for listindex and not in array()
sTest = vbNullChar & Replace(sLookIn, VM, vbNullChar) & vbNullChar
sPos = InStr(1, sTest, vbNullChar & FindValue & vbNullChar)
If sPos > 0 Then
   Locate = sPos
   sNewTest = Left(sTest, sPos)
   sNewArray = Split(sNewTest, vbNullChar)
   Locate = UBound(sNewArray) - 1
End If

Exit Function
LocalError:
   ' just in case
End Function

jak

----- Original Message ----- From: "Bhupendra Jamnadas" <[EMAIL PROTECTED]>
To: <[email protected]>
Sent: Thursday, June 01, 2006 12:38 AM
Subject: [U2] Implementing LOCATE function in .NET


Hi,

I have a problem wherein I need to implement the functionality of LOCATE
function with it's "AR"/"AL"/"DR"/"DL" sequence in .NET. Creating a
Universe program or subroutine and using this method therein is not an
option. Is there any way to call BASIC functions from UODOTNET or has
someone tried to implement this function in .NET?

Thanks,
Bhupendra.
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/


--
No virus found in this incoming message.
Checked by AVG Free Edition.
Version: 7.1.394 / Virus Database: 268.8.0/353 - Release Date: 31/05/2006
-------
u2-users mailing list
[email protected]
To unsubscribe please visit http://listserver.u2ug.org/

Reply via email to