M9A
M9A

Reputation: 3276

How to convert this line from C# to VB.net (Windows Phone 7)

Hi I am studying some codes from the web that I need for a future project, but I am having trouble changing this code from C# to VB.net. Can someone help pleasE?

this.btnAdd.Click += btnAdd_Click;

Upvotes: 0

Views: 177

Answers (3)

Independent
Independent

Reputation: 2987

Most often, for simplier conversions like that, you can use the web based tool at http://www.developerfusion.com/tools/convert/csharp-to-vb/
Though, it should be seen as a advise or guideline.

Upvotes: 0

SLaks
SLaks

Reputation: 887195

AddHandler(btnAdd.Click, AddressOf btnAdd_Click)

Upvotes: 0

ChrisF
ChrisF

Reputation: 137108

Adding event handlers is done differently in VB.NET:

AddHandler btnAdd.Click, AddressOf btnAdd_Click

Source

Upvotes: 4

Related Questions