Click here to Skip to main content
15,888,286 members
Home / Discussions / C#
   

C#

 
QuestionInheritance in C# (class + interface) Pin
kaminem24-Sep-07 22:22
kaminem24-Sep-07 22:22 
AnswerRe: Inheritance in C# (class + interface) Pin
Colin Angus Mackay24-Sep-07 22:55
Colin Angus Mackay24-Sep-07 22:55 
QuestionEmpty Catch Pin
Malcolm Smart24-Sep-07 22:04
Malcolm Smart24-Sep-07 22:04 
AnswerRe: Empty Catch Pin
pmarfleet24-Sep-07 22:16
pmarfleet24-Sep-07 22:16 
GeneralRe: Empty Catch Pin
Malcolm Smart24-Sep-07 22:22
Malcolm Smart24-Sep-07 22:22 
GeneralRe: Empty Catch Pin
Colin Angus Mackay24-Sep-07 22:33
Colin Angus Mackay24-Sep-07 22:33 
GeneralRe: Empty Catch Pin
pmarfleet24-Sep-07 22:35
pmarfleet24-Sep-07 22:35 
AnswerRe: Empty Catch Pin
Guffa24-Sep-07 23:11
Guffa24-Sep-07 23:11 
That depends on if you are using framework 1 or 2.

In framework 1, the difference is that catch(Exception) catches .NET exception, while a parameterless catch catches all exceptions.

In managed code you can only throw exceptions that derive from System.Exception, but if you call unmanaged code it may throw any object as an exception.

If you need to handle all exceptions in framework 1, you should use both a catch(Exception) and a parameterless catch, so that you get all available information.

In framework 2, anything thrown that doesn't derive from System.Exception is wrapped inside a System.Runtime.CompilerServices.RuntimeWrappedException object, so there is no longer any use for a parameterless catch. To specifically catch unmanaged exceptions you use catch(RuntimeWrappedException), otherwise you can just use catch(Exception) to catch them too.

---
single minded; short sighted; long gone;

GeneralRe: Empty Catch Pin
Scott Dorman25-Sep-07 3:59
professionalScott Dorman25-Sep-07 3:59 
GeneralRe: Empty Catch Pin
Guffa25-Sep-07 10:21
Guffa25-Sep-07 10:21 
QuestionDevelop Outlook in C# Windows forms Pin
senselva24-Sep-07 21:58
senselva24-Sep-07 21:58 
AnswerRe: Develop Outlook in C# Windows forms Pin
Corinna John25-Sep-07 0:56
Corinna John25-Sep-07 0:56 
QuestionGoogle Suggest feature with ASP.NET 2.0 Pin
jebin k24-Sep-07 20:39
jebin k24-Sep-07 20:39 
AnswerRe: Google Suggest feature with ASP.NET 2.0 Pin
dengboo24-Sep-07 20:48
dengboo24-Sep-07 20:48 
GeneralRe: Google Suggest feature with ASP.NET 2.0 Pin
jebin k25-Sep-07 1:25
jebin k25-Sep-07 1:25 
QuestionReportingService.GetReportParameters Pin
amraouf24-Sep-07 20:18
amraouf24-Sep-07 20:18 
AnswerRe: ReportingService.GetReportParameters Pin
pmarfleet24-Sep-07 21:35
pmarfleet24-Sep-07 21:35 
GeneralRe: ReportingService.GetReportParameters Pin
amraouf24-Sep-07 21:52
amraouf24-Sep-07 21:52 
GeneralRe: ReportingService.GetReportParameters Pin
pmarfleet24-Sep-07 22:11
pmarfleet24-Sep-07 22:11 
Questioncode for reading afile from the folder on c# Pin
ramyanaidu24-Sep-07 20:08
ramyanaidu24-Sep-07 20:08 
AnswerRe: code for reading afile from the folder on c# Pin
Paras Kaneriya24-Sep-07 20:18
Paras Kaneriya24-Sep-07 20:18 
AnswerRe: code for reading afile from the folder on c# Pin
Christian Graus24-Sep-07 20:21
protectorChristian Graus24-Sep-07 20:21 
QuestionApplication installation giving problem Pin
Maddie from Dartford24-Sep-07 19:51
Maddie from Dartford24-Sep-07 19:51 
QuestionDisplay images in PictureBox Pin
praveen pandey24-Sep-07 19:43
praveen pandey24-Sep-07 19:43 
AnswerRe: Display images in PictureBox Pin
Christian Graus24-Sep-07 19:58
protectorChristian Graus24-Sep-07 19:58 

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.