Netduino home hardware projects downloads community

Jump to content


The Netduino forums have been replaced by new forums at community.wildernesslabs.co. This site has been preserved for archival purposes only and the ability to make new accounts or posts has been turned off.
Photo

VB NativeEventHandler and InterruptPort


  • Please log in to reply
2 replies to this topic

#1 VBWorld

VBWorld

    New Member

  • Members
  • Pip
  • 6 posts
  • LocationGermany

Posted 05 October 2014 - 01:16 PM

Hello,

 

today I found this article (http://blogs.msdn.co...work-netmf.aspx). I try to translate it to VB, but at one point my translation will not work:

 

This

interIn.OnInterrupt += new NativeEventHandler(interIn_OnInterrupt);

I translate to

interIn.OnInterrupt += New NativeEventHandler(AddressOf interIn_OnInterrupt)

But it will underlined blue and says that I should use a RaiseEvent-Statement ....

 

Somebody here, who can help me?

 

VBWorld

 

Sorry for my bad english ...



#2 Stanislav Husár

Stanislav Husár

    Advanced Member

  • Members
  • PipPipPip
  • 99 posts

Posted 05 October 2014 - 03:32 PM

Hello,

 

VB.NET uses different syntax for this. If I remember correctly, it is done this way:

AddHandler empfangen.OnInterrupt, interIn_OnInterrupt



#3 VBWorld

VBWorld

    New Member

  • Members
  • Pip
  • 6 posts
  • LocationGermany

Posted 05 October 2014 - 05:06 PM

Thank you, so it is right:

AddHandler interIn.OnInterrupt, AddressOf interIn_OnInterrupt

VBWorld






0 user(s) are reading this topic

0 members, 0 guests, 0 anonymous users

home    hardware    projects    downloads    community    where to buy    contact Copyright © 2016 Wilderness Labs Inc.  |  Legal   |   CC BY-SA
This webpage is licensed under a Creative Commons Attribution-ShareAlike License.