test how catch exception c# April 13, 2023 by wordlinkanswers test how catch exception c# Comment 0 [TestMethod]<br /> [ExpectedException(typeof(ArgumentException),<br /> “A userId of null was inappropriately allowed.”)]<br /> public void NullUserIdInConstructor()<br /> {<br /> LogonInfo logonInfo = new LogonInfo(null, “P@ss0word”);<br /> } Popularity 9/10 Helpfulness 2/10 Language csharp Source: stackoverflow.com Tags: c# catch-exception Share Link to this answer Share Contributed on Mar 02 2020 Wrong Wombat 0 Answers Avg Quality 2/10