C# to VB help

M

Mirnes

Hello,

Can someone provide me with VB code for following C# code:

Code 1:
{
IndexerSchedule.Install(20);
}


Code 2:
{
DataTable dtResult = SiteSearch.Search(txtWord.Text);
DataView dvResult = new DataView(dtResult);
dvResult.Sort = "count DESC";
DataGrid1.Visible=true;
DataGrid1.DataSource=dvResult;
DataGrid1.DataBind();
}

Thanks in advance!
 
G

Guest

Hello,

Can someone provide me with VB code for following C# code:

Code 1:
{
IndexerSchedule.Install(20);
}

Code 2:
{
DataTable dtResult = SiteSearch.Search(txtWord.Text);
DataView dvResult = new DataView(dtResult);
dvResult.Sort = "count DESC";
DataGrid1.Visible=true;
DataGrid1.DataSource=dvResult;
DataGrid1.DataBind();
}

Thanks in advance!

IndexerSchedule.Install(20)

Dim dtResult As DataTable = SiteSearch.Search(txtWord.Text)
Dim dvResult As DataView = New DataView(dtResult)
dvResult.Sort = "count DESC"
DataGrid1.Visible=True
DataGrid1.DataSource=dvResult
DataGrid1.DataBind()
 
J

Juan T. Llibre

IndexerSchedule.Install(20)


Dim dtResult As DataTable = SiteSearch.Search(txtWord.Text)
Dim dvResult As New DataView(dtResult)
dvResult.Sort = "count DESC"
DataGrid1.Visible = True
DataGrid1.DataSource = dvResult
DataGrid1.DataBind()
 
T

Turkbear

Hi, Mimes.

In the future, you might want to consider running the code
you want translated through one of these converters : snip
http://www.developerfusion.co.uk/utilities/convertvbtocsharp.aspx
http://www.developerfusion.co.uk/utilities/convertcsharptovb.aspx
snip

You might get the translation even faster!

:)

Unfortunately, those sites ( actually that app has a problem,)


Server Error in '/Utilities' Application.
--------------------------------------------------------------------------------

Input string was not in a correct format.



If anyone knows the admins, they should let them know..
 
J

Juan T. Llibre

re:
!> Input string was not in a correct format

You *do* need to input correct code in whatever language
you request be translated to the other language.

If your input is not correctly formatted, you get that message.

It's a variation of the "garbage in, garbage out" computing principle.
You *must* feed the translator correct code.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,995
Messages
2,570,236
Members
46,825
Latest member
VernonQuy6

Latest Threads

Top