Click here to Skip to main content
15,921,156 members
Home / Discussions / C#
   

C#

 
AnswerRe: Permanent repaint of button at mouse click Pin
Mycroft Holmes11-Oct-08 17:44
professionalMycroft Holmes11-Oct-08 17:44 
GeneralRe: Permanent repaint of button at mouse click Pin
Zeddan11-Oct-08 18:00
Zeddan11-Oct-08 18:00 
GeneralRe: Permanent repaint of button at mouse click Pin
Dave Kreskowiak12-Oct-08 4:26
mveDave Kreskowiak12-Oct-08 4:26 
AnswerRe: Permanent repaint of button at mouse click Pin
DaveyM6911-Oct-08 20:36
professionalDaveyM6911-Oct-08 20:36 
QuestionInserting image in header/footer of a word document Pin
Punitha_V11-Oct-08 7:09
Punitha_V11-Oct-08 7:09 
RantRe: Inserting image in header/footer of a word document Pin
Pedram Behroozi11-Oct-08 7:26
Pedram Behroozi11-Oct-08 7:26 
AnswerRe: Inserting image in header/footer of a word document Pin
Mohammad Dayyan12-Oct-08 0:14
Mohammad Dayyan12-Oct-08 0:14 
QuestionException Handling Question Pin
Rafone11-Oct-08 6:05
Rafone11-Oct-08 6:05 
Morning fellow code writers...

I have a try and catch process that is giving me fits...If I eliminate the throw new Exception(ex.Message); line I get an error: Error 3 Use of unassigned local variable 'tbl'.
Can somebody enlighten me as to why this is happening??

catch (Exception ex)
{
MessageBox.Show("The following error occurred :" + ex.Message, Application.ProductName,
MessageBoxButtons.OK, MessageBoxIcon.Information);
string logFile;
string logPath = Application.StartupPath + "\\logs\\";
logFile = (logPath + global.logDate + ".log");
StreamWriter writer = new StreamWriter(logFile, true, System.Text.Encoding.ASCII);
writer.WriteLine(System.DateTime.Now);
writer.WriteLine("[Process #]");
writer.WriteLine("[get data]");
writer.WriteLine(ex.Message);
writer.WriteLine("\r");
writer.Close();
throw new Exception(ex.Message);
}//end of catch
return tbl;
}
}//end of class name
}//end of namespace



TIA
Rafone

Statistics are like bikini's...
What they reveal is astonishing ...
But what they hide is vital ...
AnswerRe: Exception Handling Question Pin
Pedram Behroozi11-Oct-08 6:14
Pedram Behroozi11-Oct-08 6:14 
AnswerRe: Exception Handling Question Pin
S. Senthil Kumar11-Oct-08 6:15
S. Senthil Kumar11-Oct-08 6:15 
AnswerRe: Exception Handling Question Pin
Giorgi Dalakishvili11-Oct-08 6:21
mentorGiorgi Dalakishvili11-Oct-08 6:21 
GeneralRe: Exception Handling Question Pin
Rafone11-Oct-08 8:35
Rafone11-Oct-08 8:35 
GeneralRe: Exception Handling Question Pin
Kevin McFarlane12-Oct-08 4:16
Kevin McFarlane12-Oct-08 4:16 
AnswerRe: Exception Handling Question Pin
Colin Angus Mackay11-Oct-08 6:22
Colin Angus Mackay11-Oct-08 6:22 
GeneralRe: Exception Handling Question Pin
Rafone11-Oct-08 8:44
Rafone11-Oct-08 8:44 
AnswerRe: Exception Handling Question Pin
Paul Conrad11-Oct-08 6:33
professionalPaul Conrad11-Oct-08 6:33 
AnswerRe: Exception Handling Question Pin
Rafone11-Oct-08 8:07
Rafone11-Oct-08 8:07 
AnswerRe: Exception Handling Question Pin
Pete O'Hanlon12-Oct-08 9:52
mvePete O'Hanlon12-Oct-08 9:52 
QuestionMemory Management Pin
Mogaambo11-Oct-08 5:58
Mogaambo11-Oct-08 5:58 
AnswerRe: Memory Management Pin
S. Senthil Kumar11-Oct-08 6:10
S. Senthil Kumar11-Oct-08 6:10 
QuestionUnsafe code Pin
dan!sh 11-Oct-08 5:56
professional dan!sh 11-Oct-08 5:56 
AnswerRe: Unsafe code Pin
Colin Angus Mackay11-Oct-08 6:08
Colin Angus Mackay11-Oct-08 6:08 
GeneralRe: Unsafe code Pin
dan!sh 11-Oct-08 6:12
professional dan!sh 11-Oct-08 6:12 
GeneralRe: Unsafe code Pin
Mark Churchill12-Oct-08 0:46
Mark Churchill12-Oct-08 0:46 
AnswerRe: Unsafe code Pin
S. Senthil Kumar11-Oct-08 6:18
S. Senthil Kumar11-Oct-08 6:18 

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.