I currently have an example application written in C#, and I'd like to use code from that in my VB.NET project. Right now, the function I'm trying to copy over looks like this:
private void Start(CardInfo networkCard, IEnumerable<int> universes)
{
socket = new StreamingAcnSocket(Guid.NewGuid(), "Streaming ACN Snoop");
socket.NewPacket += new EventHandler<NewPacketEventArgs<Acn.Packets.sAcn.StreamingAcnDmxPacket>>(socket_NewPacket); //This is the line I'm having trouble with
socket.Open(networkCard.IpAddress);
foreach (int universe in universes)
socket.JoinDmxUniverse(universe);
dmxOutput = new DmxStreamer(socket);
dmxOutput.AddUniverse(sendData.Universe);
acnPortExplorer = new RdmNetEndPointExplorer();
acnPortExplorer.LocalAdapter = networkCard.IpAddress;
acnPortExplorer.NewEndpointFound += acnPortExplorer_NewEndpointFound;
acnPortExplorer.Start();
}
Here is the VB code I have so far:
Private Sub Start(networkCard As CardInfo, universes As IEnumerable(Of Integer))
socket = New StreamingAcnSocket(Guid.NewGuid(), "Streaming ACN Snoop")
''yet to convert this line
socket.Open(networkCard.IpAddress)
For Each universe As Integer In universes
socket.JoinDmxUniverse(universe)
Next
dmxOutput = New DmxStreamer(socket)
dmxOutput.AddUniverse(sendData.Universe)
acnPortExplorer = New RdmNetEndPointExplorer()
acnPortExplorer.LocalAdapter = networkCard.IpAddress
acnPortExplorer.NewEndpointFound += acnPortExplorer_NewEndpointFound
acnPortExplorer.Start()
End Sub
I am trying to convert this, among other functions, to VB. I have managed to convert pretty much everything with the help of an online code converter. However, I am still unable to figure out how to convert line 4 to VB.
In case it matters, this is from the StreamingACN example project from ACN on codeplex (https://acn.codeplex.com/).
I'd appreciate any help I can get. Thanks!