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

C#

 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
PIEBALDconsult7-Dec-10 2:32
mvePIEBALDconsult7-Dec-10 2:32 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
Moustafa Safwat7-Dec-10 17:36
Moustafa Safwat7-Dec-10 17:36 
AnswerRe: I face a problem on reading the stream (Telnet Client) Pin
PIEBALDconsult7-Dec-10 2:32
mvePIEBALDconsult7-Dec-10 2:32 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
Moustafa Safwat7-Dec-10 17:43
Moustafa Safwat7-Dec-10 17:43 
AnswerRe: I face a problem on reading the stream (Telnet Client) Pin
jschell7-Dec-10 10:16
jschell7-Dec-10 10:16 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
Moustafa Safwat7-Dec-10 18:01
Moustafa Safwat7-Dec-10 18:01 
GeneralRe: I face a problem on reading the stream (Telnet Client) Pin
PIEBALDconsult7-Dec-10 18:26
mvePIEBALDconsult7-Dec-10 18:26 
QuestionNeed Help Understanding Error Handling Pin
JDM67636-Dec-10 9:34
JDM67636-Dec-10 9:34 
I'm having trouble understanding, or rather some confussion with when to return error codes(User-Defined), true or false, when to throw an exception or handle as another path of logic. In some cases I may be making thing overly complex... I don't know.

For instance.. here is a code snippet where I'm I have a function that gets the correct WMI Namespace. If it returns a valid WMI Namespace, it continues on. In cases like this, is returning false the correct way to do this or should I be returning a user-defined error code? I understand the concept of the Try...Catch as well.. but it's what is supposed to be returned or thrown that makes me confused. Confused | :confused:

string correctNamespace = GetCorrectWmiNameSpace();
if (string.Equals(correctNamespace, string.Empty))
{
   return false;                
}

AnswerRe: Need Help Understanding Error Handling PinPopular
Luc Pattyn6-Dec-10 9:58
sitebuilderLuc Pattyn6-Dec-10 9:58 
GeneralRe: Need Help Understanding Error Handling Pin
JDM67636-Dec-10 10:09
JDM67636-Dec-10 10:09 
GeneralRe: Need Help Understanding Error Handling Pin
DaveyM698-Dec-10 2:48
professionalDaveyM698-Dec-10 2:48 
GeneralRe: Need Help Understanding Error Handling Pin
Luc Pattyn8-Dec-10 4:35
sitebuilderLuc Pattyn8-Dec-10 4:35 
AnswerRe: Need Help Understanding Error Handling Pin
PIEBALDconsult6-Dec-10 12:21
mvePIEBALDconsult6-Dec-10 12:21 
Questionhow to convert dataset to excell ? Pin
Gali19786-Dec-10 9:04
Gali19786-Dec-10 9:04 
AnswerRe: how to convert dataset to excell ? Pin
Pawel Gielmuda6-Dec-10 22:50
Pawel Gielmuda6-Dec-10 22:50 
AnswerRe: how to convert dataset to excell ? Pin
RaviRanjanKr17-Dec-10 18:02
professionalRaviRanjanKr17-Dec-10 18:02 
QuestionSending attachments with SMTP Client Pin
musefan6-Dec-10 3:39
musefan6-Dec-10 3:39 
AnswerRe: Sending attachments with SMTP Client Pin
OriginalGriff6-Dec-10 3:42
mveOriginalGriff6-Dec-10 3:42 
GeneralRe: Sending attachments with SMTP Client Pin
musefan6-Dec-10 3:52
musefan6-Dec-10 3:52 
AnswerRe: Sending attachments with SMTP Client Pin
musefan6-Dec-10 4:15
musefan6-Dec-10 4:15 
AnswerRe: Sending attachments with SMTP Client [modified] Pin
PIEBALDconsult6-Dec-10 4:16
mvePIEBALDconsult6-Dec-10 4:16 
GeneralRe: Sending attachments with SMTP Client Pin
musefan6-Dec-10 4:20
musefan6-Dec-10 4:20 
GeneralRe: Sending attachments with SMTP Client Pin
PIEBALDconsult6-Dec-10 4:24
mvePIEBALDconsult6-Dec-10 4:24 
GeneralRe: Sending attachments with SMTP Client Pin
musefan6-Dec-10 4:30
musefan6-Dec-10 4:30 
GeneralRe: Sending attachments with SMTP Client Pin
PIEBALDconsult6-Dec-10 4:40
mvePIEBALDconsult6-Dec-10 4:40 

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.