Hallo erstmal,
bin totaler Anfänger in C# und benötige einen Tip wie ich einen Wert aus einer "listBox" als einstellung für einen Port übernehme.
Ich habe ein Einfaches Programm erstellt dass bei mir auf einen fest eingestellten UDP Port Daten empfängt und in einer listBox ausgibt,das funktioniert ja auch.
Also ich gehe so vor :
listBox2.ItemsAdd.("600"); ---> in meiner listBox wird als Defaultwert der Port "600" eingestellt
so baue ich die verbindung auf:
listener = new UdpClient(hier sollte der Port aus der listBox übernomen werden);
groupEP = new IPEndPoint(IPAdress.Any,hier sollte der Port aus der listBox übernomen werden);
ist für euch bestimmt total einfach , aber ich zerbreche mir den Kopf seit 3 Tagen