Click here to Skip to main content
15,907,497 members
Home / Discussions / C#
   

C#

 
QuestionClear ButtonClick event Pin
SamuelClay11-Sep-07 7:41
SamuelClay11-Sep-07 7:41 
AnswerRe: Clear ButtonClick event Pin
Kristian Sixhøj11-Sep-07 7:50
Kristian Sixhøj11-Sep-07 7:50 
AnswerRe: Clear ButtonClick event Pin
Christian Graus11-Sep-07 8:03
protectorChristian Graus11-Sep-07 8:03 
GeneralRe: Clear ButtonClick event Pin
SamuelClay11-Sep-07 8:25
SamuelClay11-Sep-07 8:25 
AnswerRe: Clear ButtonClick event Pin
Brent Lamborn12-Sep-07 3:21
Brent Lamborn12-Sep-07 3:21 
QuestionError : Not All Code Paths Return A Value Pin
ctrlnick11-Sep-07 6:50
ctrlnick11-Sep-07 6:50 
AnswerRe: Error : Not All Code Paths Return A Value Pin
Patrick Etc.11-Sep-07 6:53
Patrick Etc.11-Sep-07 6:53 
AnswerRe: Error : Not All Code Paths Return A Value Pin
Christian Graus11-Sep-07 7:00
protectorChristian Graus11-Sep-07 7:00 
The reason you're getting this error, is that not all code paths will return a value. The best thing to do is to declare an instance of the return type at the top, with a default value, set that value in the rest of the code, and return it at the bottom.

What do you want it to return if the method throws an exception ? Why do you have a generic try/catch here at all, what errors are you anticipating, and if they are written to the console, who will see them ? What will the rest of the code do if an error is caught and swallowed here, just try to soldier on ?


Christian Graus - Microsoft MVP - C++

"I am working on a project that will convert a FORTRAN code to corresponding C++ code.I am not aware of FORTRAN syntax" ( spotted in the C++/CLI forum )

QuestionDifferentiate :User accessing form internet and user accessing from with the organization Pin
ss.mmm11-Sep-07 6:40
ss.mmm11-Sep-07 6:40 
AnswerRe: Differentiate :User accessing form internet and user accessing from with the organization Pin
Giorgi Dalakishvili11-Sep-07 6:47
mentorGiorgi Dalakishvili11-Sep-07 6:47 
QuestionHow to call ButtonClick event? Pin
ss.mmm11-Sep-07 6:38
ss.mmm11-Sep-07 6:38 
AnswerRe: How to call ButtonClick event? Pin
Christian Graus11-Sep-07 6:47
protectorChristian Graus11-Sep-07 6:47 
AnswerRe: How to call ButtonClick event? Pin
Giorgi Dalakishvili11-Sep-07 6:56
mentorGiorgi Dalakishvili11-Sep-07 6:56 
GeneralRe: How to call ButtonClick event? Pin
ss.mmm11-Sep-07 8:42
ss.mmm11-Sep-07 8:42 
QuestionCrystal Reports XI R2 question Pin
mjmcinto11-Sep-07 5:56
mjmcinto11-Sep-07 5:56 
AnswerRe: Crystal Reports XI R2 question Pin
Mark Miller11-Sep-07 7:42
Mark Miller11-Sep-07 7:42 
QuestionLooking for vector editor. Pin
nEJIbMEHb11-Sep-07 5:54
nEJIbMEHb11-Sep-07 5:54 
AnswerRe: Looking for vector editor. Pin
Christian Graus11-Sep-07 6:04
protectorChristian Graus11-Sep-07 6:04 
GeneralRe: Looking for vector editor. Pin
nEJIbMEHb11-Sep-07 6:16
nEJIbMEHb11-Sep-07 6:16 
GeneralRe: Looking for vector editor. Pin
Christian Graus11-Sep-07 6:33
protectorChristian Graus11-Sep-07 6:33 
GeneralRe: Looking for vector editor. Pin
Pete O'Hanlon11-Sep-07 10:58
mvePete O'Hanlon11-Sep-07 10:58 
QuestionErase GraphicsPath Pin
greekius11-Sep-07 4:57
greekius11-Sep-07 4:57 
AnswerRe: Erase GraphicsPath Pin
Mark Miller11-Sep-07 5:56
Mark Miller11-Sep-07 5:56 
GeneralRe: Erase GraphicsPath Pin
greekius11-Sep-07 6:50
greekius11-Sep-07 6:50 
GeneralRe: Erase GraphicsPath Pin
Mark Miller11-Sep-07 7:12
Mark Miller11-Sep-07 7:12 

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.