Zdravim mam takyto kod:
client = new UdpClient(localPort);
a potom:
received = client.Receive(ref host);
receivedString = Encoding.ASCII.GetString(received);
a chcem to spravit takto ze to dat do try a catch aby to vyzeralo takto:
try
{
received = client.Receive(ref host);
receivedString = Encoding.ASCII.GetString(received);
}
catch
{.....}
Neviem ci to ma zmysel tam davat tak preto by som chcel nejako poradit ..... ide vlastne o to ze ak nebudu data prichadzat nech vybene vynimka ... ale zase ked ten blok try a catch tam mam a nasilne vypnem program tak vybehne vynimka co by nemala ... no len asi je este nieco ulozene v tej premennej