Click here to Skip to main content
15,885,905 members
Home / Discussions / C#
   

C#

 
Questionreturn type error "not all code paths return a value" Pin
wjbjnr10-May-10 0:42
wjbjnr10-May-10 0:42 
AnswerRe: return type error "not all code paths return a value" Pin
nagendrathecoder10-May-10 0:53
nagendrathecoder10-May-10 0:53 
AnswerRe: return type error "not all code paths return a value" [modified] Pin
Pete O'Hanlon10-May-10 0:57
mvePete O'Hanlon10-May-10 0:57 
QuestionRe: return type error "not all code paths return a value" Pin
wjbjnr10-May-10 4:31
wjbjnr10-May-10 4:31 
AnswerRe: return type error "not all code paths return a value" Pin
Alan N10-May-10 5:38
Alan N10-May-10 5:38 
AnswerRe: return type error "not all code paths return a value" Pin
Som Shekhar10-May-10 1:02
Som Shekhar10-May-10 1:02 
QuestionRe: return type error "not all code paths return a value" Pin
wjbjnr10-May-10 5:25
wjbjnr10-May-10 5:25 
AnswerRe: return type error "not all code paths return a value" Pin
Som Shekhar10-May-10 5:35
Som Shekhar10-May-10 5:35 
IMPORTANT:
Use 'pre' tags for your code. without those tags, the code is totally unreadable. Also, do preview your post. There are many errors in your post.

Now, the second code works because it considers all possible values of x. if it is less than 1, it returns false. otherwise, for all other values, it can be either true or false.

try changing the code to x<=0
GeneralRe: return type error "not all code paths return a value" Pin
wjbjnr10-May-10 6:15
wjbjnr10-May-10 6:15 
GeneralRe: return type error "not all code paths return a value" Pin
Som Shekhar10-May-10 6:48
Som Shekhar10-May-10 6:48 
QuestionRe: return type error "not all code paths return a value" Pin
wjbjnr10-May-10 7:59
wjbjnr10-May-10 7:59 
AnswerRe: return type error "not all code paths return a value" Pin
Som Shekhar10-May-10 8:03
Som Shekhar10-May-10 8:03 
GeneralRe: return type error "not all code paths return a value" Pin
wjbjnr10-May-10 8:43
wjbjnr10-May-10 8:43 
GeneralRe: return type error "not all code paths return a value" Pin
Som Shekhar10-May-10 8:59
Som Shekhar10-May-10 8:59 
GeneralRe: return type error "not all code paths return a value" Pin
OriginalGriff10-May-10 9:03
mveOriginalGriff10-May-10 9:03 
GeneralRe: return type error "not all code paths return a value" Pin
wjbjnr10-May-10 9:51
wjbjnr10-May-10 9:51 
QuestionListBox.DisplayName problem Pin
reza assar10-May-10 0:29
reza assar10-May-10 0:29 
AnswerRe: ListBox.DisplayName problem Pin
Heinzzy10-May-10 0:47
Heinzzy10-May-10 0:47 
GeneralRe: ListBox.DisplayName problem Pin
reza assar11-May-10 1:56
reza assar11-May-10 1:56 
Questioncreating a setup in c#.net Pin
prasadbuddhika9-May-10 23:36
prasadbuddhika9-May-10 23:36 
AnswerRe: creating a setup in c#.net Pin
Pete O'Hanlon10-May-10 0:15
mvePete O'Hanlon10-May-10 0:15 
AnswerRe: creating a setup in c#.net Pin
Abhinav S10-May-10 0:34
Abhinav S10-May-10 0:34 
AnswerRe: creating a setup in c#.net Pin
prasadbuddhika10-May-10 6:30
prasadbuddhika10-May-10 6:30 
QuestionSNMP From C# Pin
Anders Molin9-May-10 23:26
professionalAnders Molin9-May-10 23:26 
Questionretrieving PDF from SQL database and printing it in C# Pin
mrkeivan9-May-10 22:50
mrkeivan9-May-10 22:50 

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.