Click here to Skip to main content
16,005,697 members
Home / Discussions / C#
   

C#

 
GeneralRe: how to set the value to exception object? Pin
Colin Angus Mackay18-Dec-06 0:24
Colin Angus Mackay18-Dec-06 0:24 
GeneralRe: how to set the value to exception object? Pin
babutkchn18-Dec-06 23:50
babutkchn18-Dec-06 23:50 
GeneralRe: how to set the value to exception object? Pin
Colin Angus Mackay19-Dec-06 6:39
Colin Angus Mackay19-Dec-06 6:39 
AnswerRe: how to set the value to exception object? Pin
Guffa17-Dec-06 23:45
Guffa17-Dec-06 23:45 
GeneralRe: how to set the value to exception object? Pin
babutkchn17-Dec-06 23:39
babutkchn17-Dec-06 23:39 
GeneralRe: how to set the value to exception object? Pin
Colin Angus Mackay17-Dec-06 23:41
Colin Angus Mackay17-Dec-06 23:41 
AnswerRe: how to set the value to exception object? Pin
Guffa17-Dec-06 23:45
Guffa17-Dec-06 23:45 
Questionhow to set the value to Exception.Message or this.message properties? Pin
babutkchn17-Dec-06 23:01
babutkchn17-Dec-06 23:01 
Hi all,

how to set a value to custom exception message? I tried to set the value, since its a read only property couldnt able to set it...i tried it as follows


public class Customexp:ApplicationException
{
public void frm(String mess)
{
this.Message="test";
this.Source = "kjashdfkj";
}
}

for this code, error is as follows

Property or indexer 'System.Exception.Message' cannot be assigned to -- it is read only

can anyone tell me how to solve this problem.

the clear point is, i've to create an exception object and have to set the value for it.


Regards
babu
AnswerRe: how to set the value to Exception.Message or this.message properties? Pin
Martin#17-Dec-06 23:17
Martin#17-Dec-06 23:17 
GeneralRe: how to set the value to Exception.Message or this.message properties? Pin
Colin Angus Mackay17-Dec-06 23:37
Colin Angus Mackay17-Dec-06 23:37 
GeneralRe: how to set the value to Exception.Message or this.message properties? Pin
Martin#17-Dec-06 23:49
Martin#17-Dec-06 23:49 
AnswerRe: how to set the value to Exception.Message or this.message properties? Pin
Guffa17-Dec-06 23:22
Guffa17-Dec-06 23:22 
GeneralRe: how to set the value to Exception.Message or this.message properties? Pin
Martin#17-Dec-06 23:32
Martin#17-Dec-06 23:32 
GeneralRe: how to set the value to Exception.Message or this.message properties? Pin
Guffa18-Dec-06 0:47
Guffa18-Dec-06 0:47 
GeneralRe: how to set the value to Exception.Message or this.message properties? Pin
Martin#18-Dec-06 0:55
Martin#18-Dec-06 0:55 
GeneralRe: how to set the value to Exception.Message or this.message properties? Pin
babutkchn17-Dec-06 23:41
babutkchn17-Dec-06 23:41 
AnswerRe: how to set the value to Exception.Message or this.message properties? Pin
Guffa17-Dec-06 23:44
Guffa17-Dec-06 23:44 
AnswerRe: how to set the value to Exception.Message or this.message properties? Pin
Pete O'Hanlon17-Dec-06 23:32
mvePete O'Hanlon17-Dec-06 23:32 
AnswerRe: how to set the value to Exception.Message or this.message properties? Pin
Colin Angus Mackay17-Dec-06 23:38
Colin Angus Mackay17-Dec-06 23:38 
GeneralRe: how to set the value to Exception.Message or this.message properties? Pin
Pete O'Hanlon17-Dec-06 23:54
mvePete O'Hanlon17-Dec-06 23:54 
GeneralRe: how to set the value to Exception.Message or this.message properties? Pin
Colin Angus Mackay18-Dec-06 0:28
Colin Angus Mackay18-Dec-06 0:28 
GeneralRe: how to set the value to Exception.Message or this.message properties? Pin
Pete O'Hanlon18-Dec-06 0:31
mvePete O'Hanlon18-Dec-06 0:31 
Questionadding smileyes in chat software????? Pin
imshimshal17-Dec-06 21:52
imshimshal17-Dec-06 21:52 
AnswerRe: adding smileyes in chat software????? Pin
Colin Angus Mackay17-Dec-06 22:46
Colin Angus Mackay17-Dec-06 22:46 
AnswerRe: adding smileyes in chat software????? Pin
abd_o_d17-Dec-06 23:56
abd_o_d17-Dec-06 23:56 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.