public Services(string hostName) { try { if (hostName!=null) { } else { ManuallyThrowException(hostName); //if not try catch it displays here } } catch(Exception e) { throw; //but it is displaying here if try catch } } public static void Main() { Services(null); // i need to display exeception here }
try { Services(null); // i need to display exeception here } catch (Exception me) { Console.WriteLine(me.Message); }
var
This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)