I was wondering if the code below demonstrates a custom exception in C#?
public class NoBobException : Exception { public NoBobException() : base("No Bob's in TextBox") { } } private void BobsForm_Load(object sender, EventArgs e) { if(textbox1.text == "Bob") { throw new NoBobException(); } }
derivedfromExceptionis acustomone.