Skip to content

How to set a value to Exception.Message or this.Message

Babu

Asked Dec 19, 2006, 1:08 AM EST1 answer
Share
LinkedInX
hi, how to set the value to a exception object. this.Message = ""; or Exception.Message = "";

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    Exception exc = new Exception("Error message here");

    I'm pretty sure that the "exc.Message" is read only, and thus can't be assigned later.
    Of course, you could just make your own exception...
    0