Calling a .net dll

ninel

Active member
Joined
Mar 23, 2005
Messages
32
Location
Land O Lakes, Florida
Programming Experience
3-5
I have a 3rd party dll created on .net. I need to create a vb.net app calling the properties/methods of that dll.

I have the code in C# to do this, but how can I change it to work in vb.net?

ADSLib.ADSData pData = New ADSLib.ADSData();
If (pData.ValidaClockId(txtClockId.text, txtPin.text)) Then
{
Response.redirect("process.aspx?clock_id=" + txtClockID.Text +
"&command=" + e.CommandArgument.ToString(), true);
}
Else
{
lblMessages.Text = "Invalid ClockID or PIN Code!";
return;
}

Thanks,
Ninel
 

kulrom

Well-known member
Joined
May 10, 2005
Messages
2,854
Location
Republic of Macedonia
Programming Experience
10+
So, you need to convert C# code to VB.NET ...

If it's so then see the next code:

VB.NET:
 Dim pData As ADSLib.ADSData = New ADSLib.ADSData 
 
If (pData.ValidaClockId(txtClockId.text, txtPin.text)) Then
 
Response.redirect("process.aspx?clock_id=" & txtClockID.Text & "&command=" & e.CommandArgument.ToString(), True)
 
Else
lblMessages.Text = "Invalid ClockID or PIN Code!"
End If


Kind regards :)
 

JuggaloBrotha

VB.NET Forum Moderator
Staff member
Joined
Jun 3, 2004
Messages
4,524
Location
Lansing, MI; USA
Programming Experience
10+
if the dll code was done in c# then just add it to the project and in vb make an instance of it then everything from there is done in vb (even though the dll is in c#)
 
Top Bottom