Click here to Skip to main content
14,454,836 members
   

C#

 
GeneralRe: OleDb Error [UPDATED] Pin
Kevin Marois15-Jan-20 11:51
professionalKevin Marois15-Jan-20 11:51 
GeneralRe: OleDb Error [UPDATED] Pin
Eddy Vluggen15-Jan-20 13:15
professionalEddy Vluggen15-Jan-20 13:15 
GeneralRe: OleDb Error [UPDATED] Pin
Dave Kreskowiak15-Jan-20 13:50
mveDave Kreskowiak15-Jan-20 13:50 
GeneralRe: OleDb Error [UPDATED] Pin
Eddy Vluggen15-Jan-20 13:57
professionalEddy Vluggen15-Jan-20 13:57 
QuestionException Handling Question Pin
Kevin Marois14-Jan-20 19:53
professionalKevin Marois14-Jan-20 19:53 
AnswerRe: Exception Handling Question Pin
OriginalGriff14-Jan-20 22:19
communityengineerOriginalGriff14-Jan-20 22:19 
AnswerRe: Exception Handling Question Pin
F-ES Sitecore14-Jan-20 23:49
mveF-ES Sitecore14-Jan-20 23:49 
SuggestionRe: Exception Handling Question Pin
Richard Deeming15-Jan-20 1:38
communityengineerRichard Deeming15-Jan-20 1:38 
Kevin Marois wrote:
catch (Exception)
{
    throw;  
}
If your catch block is simply re-throwing the same exception, without adding any extra information to it, then you don't need the catch block at all.

And as Griff said, don't use throw new Exception(...); - use a specific exception type instead. Either one of the built-in exception types, or a custom exception type will do. That way, the calling code has a better chance of catching just the exceptions it can handle, without having to look at the Message to try to work out what the problem is.



"These people looked deep within my soul and assigned me a number based on the order in which I joined."
- Homer

AnswerRe: Exception Handling Question Pin
Gerry Schmitz15-Jan-20 14:44
mveGerry Schmitz15-Jan-20 14:44 
QuestionHow to add text to a script tag at src using jQuery Pin
Member 1316600712-Jan-20 8:52
MemberMember 1316600712-Jan-20 8:52 
AnswerRe: How to add text to a script tag at src using jQuery Pin
OriginalGriff12-Jan-20 11:25
communityengineerOriginalGriff12-Jan-20 11:25 
Questioni need a c# project using interfaces about anything Pin
Ali Al Akbar Hachem12-Jan-20 5:23
MemberAli Al Akbar Hachem12-Jan-20 5:23 
AnswerRe: i need a c# project using interfaces about anything Pin
OriginalGriff12-Jan-20 5:25
communityengineerOriginalGriff12-Jan-20 5:25 
AnswerRe: i need a c# project using interfaces about anything Pin
Luc Pattyn13-Jan-20 2:03
sitebuilderLuc Pattyn13-Jan-20 2:03 
QuestionAccess winforms application when user right click on a file Pin
Hero201812-Jan-20 2:54
MemberHero201812-Jan-20 2:54 
AnswerRe: Access winforms application when user right click on a file Pin
OriginalGriff12-Jan-20 3:20
communityengineerOriginalGriff12-Jan-20 3:20 
GeneralRe: Access winforms application when user right click on a file Pin
Hero201812-Jan-20 10:48
MemberHero201812-Jan-20 10:48 
GeneralRe: Access winforms application when user right click on a file Pin
OriginalGriff12-Jan-20 11:23
communityengineerOriginalGriff12-Jan-20 11:23 
GeneralRe: Access winforms application when user right click on a file Pin
Hero201812-Jan-20 13:22
MemberHero201812-Jan-20 13:22 
GeneralRe: Access winforms application when user right click on a file Pin
OriginalGriff12-Jan-20 23:07
communityengineerOriginalGriff12-Jan-20 23:07 
QuestionHtmlAgilityPack - How to get the Value from the tag <div> into aspx.cs Pin
Member 1316600710-Jan-20 7:02
MemberMember 1316600710-Jan-20 7:02 
AnswerRe: HtmlAgilityPack - How to get the Value from the tag <div> into aspx.cs Pin
Richard Deeming10-Jan-20 7:10
communityengineerRichard Deeming10-Jan-20 7:10 
Questionhow to configure LED8 customer pole display? Pin
Member 122427179-Jan-20 23:13
MemberMember 122427179-Jan-20 23:13 
AnswerRe: how to configure LED8 customer pole display? Pin
OriginalGriff9-Jan-20 23:37
communityengineerOriginalGriff9-Jan-20 23:37 
AnswerRe: how to configure LED8 customer pole display? Pin
ZurdoDev10-Jan-20 2:01
mveZurdoDev10-Jan-20 2:01 

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.