There should be a using directive for this (`using System.Net.Sockets;`), then you can just do `catch (SocketException) ...`