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


C# To VB.NET Translation

Posted on 2006-05-30
Medium Priority
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

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

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
Question by:Hepen
1 Comment
LVL 37

Accepted Solution

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.


Greg Young
MVP - C#

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