Want to protect your cyber security and still get fast solutions? Ask a secure question today.Go Premium

x
?
Solved

C# To VB.NET Translation

Posted on 2006-05-30
1
Medium Priority
?
2,737 Views
Last Modified: 2012-08-13
Udpclient is a .net object
IPEndPoint is a .net object
UDPState is a class
ar.asyncstate is just a async operation that holds something or i have no clue

C#
UdpClient u = (UdpClient)((UdpState)(ar.AsyncState)).u;
IPEndPoint e = (IPEndPoint)((UdpState)(ar.AsyncState)).e;

VB.NET
????
Dim arUDPClient As UdpClient = CType(CType(ar.AsyncState, StateObject), UdpClient)
Dim arIPEndPoint As IPEndPoint = CType(ar.AsyncState, IPEndPoint)

Please help me translate from C# to VB.NET
0
Comment
Question by:Hepen
1 Comment
 
LVL 37

Accepted Solution

by:
gregoryyoung earned 2000 total points
ID: 16794811
Dim arUDPClient As UdpClient = CType(CType(ar.AsyncState, StateObject).u, UdpClient)
Dim arIPEndPoint As IPEndPoint = CType(CType(UdpState(ar.AsyncState).e, IPEndPoint)

I think that'll do it .. just typed in in here quick but should be alright.

Cheers,

Greg Young
MVP - C#
http://geekswithblogs.net/gyoung
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

For those of you who don't follow the news, or just happen to live under rocks, Microsoft Research released a beta SDK (http://www.microsoft.com/en-us/download/details.aspx?id=27876) for the Xbox 360 Kinect. If you don't know what a Kinect is (http:…
Simulator games are perfect for generating sample realistic data streams, especially for learning data analysis. It is even useful for demoing offerings such as Azure stream analytics, PowerBI etc.
Integration Management Part 2
Despite its rising prevalence in the business world, "the cloud" is still misunderstood. Some companies still believe common misconceptions about lack of security in cloud solutions and many misuses of cloud storage options still occur every day. …
Suggested Courses

572 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