Solved

Convert to VB.net

Posted on 2014-03-18
3
303 Views
Last Modified: 2014-03-18
I'm trying to convert some C# code to VB.net, but the control in question is from the WP Toolkit and has no intellisense to help me work out what is happening.  I'm guessing that it's an event handler but I don't know where s1 comes from.  Can someone VBize it please?

messageBox.Dismissed += (s1, e1) =>
    {
        switch (e1.Result)

Open in new window

0
Comment
Question by:Dodsworth
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
3 Comments
 
LVL 75

Expert Comment

by:käµfm³d 👽
ID: 39936975
Please provide the delegate definition for the Dismissed property.
0
 
LVL 1

Author Comment

by:Dodsworth
ID: 39937324
There doesn't appear to be one.  But I found this in the object browser..

Public Event Dismissed(sender As Object, e As Microsoft.Phone.Controls.DismissedEventArgs)
Member of Microsoft.Phone.Controls.CustomMessageBox
0
 
LVL 75

Accepted Solution

by:
käµfm³d   👽 earned 500 total points
ID: 39937436
That's what I was after  = )

I don't work in VB often enough to remember all of the intricacies of implicit delegates, but hopefully this is an accurate translation. You may be able to nix the "ByVal ... As XXX" parts and just leave the variable names.

AddHandler messageBox.Dismissed, Function (ByVal sender As Object, ByVal e As EventArgs)
                                     Select Case e1.Result
                                         Case ...
                                     End Select
                                 End Function

Open in new window

0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

1.0 - Introduction Converting Visual Basic 6.0 (VB6) to Visual Basic 2008+ (VB.NET). If ever there was a subject full of murkiness and bad decisions, it is this one!   The first problem seems to be that people considering this task of converting…
It’s quite interesting for me as I worked with Excel using vb.net for some time. Here are some topics which I know want to share with others whom this might help. First of all if you are working with Excel then you need to Download the Following …
Michael from AdRem Software explains how to view the most utilized and worst performing nodes in your network, by accessing the Top Charts view in NetCrunch network monitor (https://www.adremsoft.com/). Top Charts is a view in which you can set seve…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

615 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question