Hi, i'm new to c# and trying to learn it.. though it's hard that many tutorial is in vb :(
Can anyone help me translate this vb to c#? and explain me what BlogContents.Contains is in C#?
System.Threading.Thread.Sleep(2000)
Dim db As New BlogDBDataContext()
Dim q = From b In db.Blogs _
Where b.BlogContents.Contains(txtSearch.Text.Trim()) Or _
b.BlogTitle.Contains(txtSearch.Text.Trim()) _
Select b
lv.DataSource = q
lv.DataBind()
Much of the code gets deleted when i try converting it online (vb-c#):
01
02.{
03. System.Threading.Thread.Sleep(2000);
04.
05. BlogDBDataContext db = new BlogDBDataContext();
06.
07. var q = ;
08.
09. lv.DataSource = q;
10. lv.DataBind();
11.}
thank you in advance
!--removed tag-->
Enter your message below
Sign in or Join us (it's free).