Click here to Skip to main content
15,914,943 members
Home / Discussions / C#
   

C#

 
AnswerRe: Using Wild Character _ Pin
Mycroft Holmes23-May-11 14:07
professionalMycroft Holmes23-May-11 14:07 
GeneralRe: Using Wild Character _ Pin
Member 455049324-May-11 0:18
Member 455049324-May-11 0:18 
GeneralRe: Using Wild Character _ Pin
Pete O'Hanlon24-May-11 0:35
mvePete O'Hanlon24-May-11 0:35 
GeneralRe: Using Wild Character _ Pin
Pete O'Hanlon24-May-11 0:41
mvePete O'Hanlon24-May-11 0:41 
AnswerRe: Using Wild Character _ Pin
PIEBALDconsult23-May-11 14:30
mvePIEBALDconsult23-May-11 14:30 
QuestionHow to read the splitcontainers Programmatically ? Pin
Paramu197323-May-11 0:11
Paramu197323-May-11 0:11 
AnswerRe: How to read the splitcontainers Programmatically ? Pin
Richard MacCutchan23-May-11 1:21
mveRichard MacCutchan23-May-11 1:21 
GeneralRe: How to read the splitcontainers Programmatically ? Pin
Paramu197323-May-11 2:14
Paramu197323-May-11 2:14 
GeneralRe: How to read the splitcontainers Programmatically ? Pin
Richard MacCutchan23-May-11 2:43
mveRichard MacCutchan23-May-11 2:43 
GeneralRe: How to read the splitcontainers Programmatically ? Pin
Paramu197323-May-11 2:59
Paramu197323-May-11 2:59 
AnswerRe: How to read the splitcontainers Programmatically ? Pin
Eddy Vluggen23-May-11 3:24
professionalEddy Vluggen23-May-11 3:24 
AnswerRe: How to read the splitcontainers Programmatically ? Pin
Luc Pattyn23-May-11 3:39
sitebuilderLuc Pattyn23-May-11 3:39 
GeneralRe: How to read the splitcontainers Programmatically ? Pin
Paramu197323-May-11 4:48
Paramu197323-May-11 4:48 
AnswerRe: How to read the splitcontainers Programmatically ? Pin
Luc Pattyn23-May-11 4:49
sitebuilderLuc Pattyn23-May-11 4:49 
AnswerRe: How to read the splitcontainers Programmatically ? Pin
Dave Kreskowiak23-May-11 1:32
mveDave Kreskowiak23-May-11 1:32 
AnswerRe: How to read the splitcontainers Programmatically ? Pin
Blue_Boy23-May-11 1:38
Blue_Boy23-May-11 1:38 
AnswerRe: How to read the splitcontainers Programmatically ? Pin
Luc Pattyn23-May-11 3:32
sitebuilderLuc Pattyn23-May-11 3:32 
AnswerRe: How to read the splitcontainers Programmatically ? Pin
Subin Mavunkal23-May-11 20:28
Subin Mavunkal23-May-11 20:28 
Questionnested try catch Pin
Pranit Kothari22-May-11 22:21
Pranit Kothari22-May-11 22:21 
AnswerRe: nested try catch Pin
Richard MacCutchan22-May-11 22:53
mveRichard MacCutchan22-May-11 22:53 
AnswerRe: nested try catch Pin
Keith Barrow22-May-11 23:22
professionalKeith Barrow22-May-11 23:22 
Pranit Kothari wrote:
Instead of this why should I not always us base class 'Exception' and let .Net
Framework decide which exception has occurred?

To add to Richard's comment, by catching several exception types you can distinguish what has gone wrong (and depending upon the type, as Richard says , recover). If you just catch Exception you can't do this as easily, you also potentially hide things that are going wrong in your code, I've seen this:

try
{
  //Snip: Code that might throw an error here
}
catch
{
  //Ignore errors
}


This is appalling discipline. If you are worried about exceptions getting to the user (and my take is that as far as possible they never should) you can add "catch all" blocks (sometimes called Top Level Exception Handling), which at the minium should inform the user that something unexpected has gone wrong and (optionally, possibly dependant on build type) log the error/stacktrace somewhere. This[^] looks like a pretty good article on this strategy, but I think the Introduction unintentionally misleads the reader: this Top Level Exception Handling is really to catch unhandled exceptions, you should really catch those you can where they are called and deal with them there.

AnswerRe: nested try catch [modified] Pin
Subin Mavunkal22-May-11 23:59
Subin Mavunkal22-May-11 23:59 
GeneralRe: nested try catch Pin
Keith Barrow23-May-11 0:26
professionalKeith Barrow23-May-11 0:26 
AnswerRe: nested try catch Pin
RobCroll23-May-11 12:33
RobCroll23-May-11 12:33 
QuestionDatagridview in Search Pin
ismail2022-May-11 21:44
ismail2022-May-11 21:44 

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.