Click here to Skip to main content
15,896,201 members
Please Sign up or sign in to vote.
4.50/5 (2 votes)
See more:
Hi Everyone,
I'm converting C# code to VB. The C# code is here:

Using ICSharpCode.TextEditor[^]

In ICSharpCode.TextEditor TextEditorForm.cs there is following C# code.

C#
private void menuGoToNextBookmark_Click(object sender, EventArgs e)
{
    DoEditAction(ActiveEditor, new ICSharpCode.TextEditor.Actions.GotoNextBookmark
        (bookmark => true));
}


How do I convert this GotoNextBookmark constructor parameter (predicate) to VB? I think this predicate should be converted VB function. However I'm not sure what "bookmark=>true" means because the BookMark class does not have any default property as far as I see.

Any suggestions are welcome. (I'm new to .net programming in C#/VB)

Regards,

t.makita
Posted

VB
Private Sub menuGoToNextBookmark_Click(sender As Object, e As EventArgs)
    DoEditAction(ActiveEditor, New ICSharpCode.TextEditor.Actions.GotoNextBookmark(Function(bookmark) True))
End Sub



Look at this: Convert VB to C# or C# to VB
 
Share this answer
 
Comments
tmakita 3-May-12 0:35am    
Thank you for your suggesition.
I will convert and test it later.
Shahin Khorshidnia 3-May-12 5:03am    
Ok. The link is a good convertor. It's for Telerik company.
If your just converting VB.NET to C# try this http://www.developerfusion.com/tools/convert/vb-to-csharp/[^]
 
Share this answer
 
Comments
Shahin Khorshidnia 2-May-12 11:52am    
Good Link
+5
tmakita 3-May-12 0:44am    
Thank you for your information.
Unfortunately I am only converting C# code to VB.
(I'm Basic fan from DOS age)
Shahin Khorshidnia 3-May-12 5:11am    
Yeah! I remember that days. I loved QBasic and beofore than there was a HC "Home Computer" that name was Commodore 64, its OS was Basic on ROM Thank you for remembering. Now, I'm very nostalgic for that days :D
tmakita 4-May-12 7:09am    
Yes! I also use Quick Basic 4.5 Japanese version (later I bought Microsoft Basic Professional Development System). Using Basic I made a client apllication that operates Btrieve database built on NetWare Server. It was my first applycation development with PC.
Shahin Khorshidnia 4-May-12 11:35am    
Thanks anyway :D
You could try something like this;
VB.NET
DoEditAction(ActiveEditor, ICSharpCode.TextEditor.Actions.GotoNextBookmark(Function(bookmark) True))


Hope this helps,
Fredrik
 
Share this answer
 
Comments
Shahin Khorshidnia 2-May-12 11:52am    
+5
tmakita 3-May-12 0:36am    
Thank you for your suggesition.
I will convert and test it later.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900