Click here to Skip to main content
15,920,633 members
Home / Discussions / C#
   

C#

 
AnswerRe: How to localize BackgroundWorker thread? Pin
Pete O'Hanlon10-Feb-11 2:05
mvePete O'Hanlon10-Feb-11 2:05 
AnswerRe: How to localize BackgroundWorker thread? Pin
Chesnokov Yuriy10-Feb-11 2:29
professionalChesnokov Yuriy10-Feb-11 2:29 
AnswerRe: How to localize BackgroundWorker thread? Pin
Bernhard Hiller10-Feb-11 5:04
Bernhard Hiller10-Feb-11 5:04 
QuestionRe: How to localize BackgroundWorker thread? Pin
Chesnokov Yuriy10-Feb-11 6:27
professionalChesnokov Yuriy10-Feb-11 6:27 
QuestionRun Application With Non Administrator Mode Pin
Anubhava Dimri9-Feb-11 18:54
Anubhava Dimri9-Feb-11 18:54 
AnswerRe: Run Application With Non Administrator Mode Pin
Eddy Vluggen10-Feb-11 7:19
professionalEddy Vluggen10-Feb-11 7:19 
QuestionValidation techneques? Pin
venomation9-Feb-11 16:19
venomation9-Feb-11 16:19 
AnswerRe: Validation techneques? Pin
Keith Barrow9-Feb-11 22:51
professionalKeith Barrow9-Feb-11 22:51 
One way is to avoid nulls in the first place, but if you need to check , here is a start, it is longer but clearer to read:
...

bool Success(footype map) //This isn't the best name
{
 if(map.StaticImages == null)
    return false;
 if(map.Tiles == null)
    return false;
 if(map.Information.RootContentFolder == "")
    return false;
 if(map.Infomation.Rows == 0)
    return false;
 if(map.Infomation.TileSize == 0)
    return false;
}


public Foo()
{
  if(fileDetails.ToString() == string.Empty)
    return Common.ReturnResult.Failed;
  if(map == null) 
    return Common.ReturnResult.Failed;
  if(!Success(map))
    return Common.ReturnResult.Failed;
  return Common.ReturnResult.OKorWhatever;

}

Can you change the map object? If so the Success Status is probably better off there as a property, you could also break this down into further sub-properties such as HasImages, HasInformation etc

AnswerRe: Validation techneques? Pin
Dalek Dave9-Feb-11 23:02
professionalDalek Dave9-Feb-11 23:02 
AnswerRe: Validation techneques? Pin
Bernhard Hiller10-Feb-11 5:13
Bernhard Hiller10-Feb-11 5:13 
GeneralRe: Validation techneques? Pin
venomation10-Feb-11 7:43
venomation10-Feb-11 7:43 
AnswerRe: Validation techneques? Pin
Matty2210-Feb-11 16:07
Matty2210-Feb-11 16:07 
QuestionHelp with excel and hyperlinks Pin
turbosupramk39-Feb-11 10:11
turbosupramk39-Feb-11 10:11 
AnswerRe: Help with excel and hyperlinks Pin
Dalek Dave9-Feb-11 11:23
professionalDalek Dave9-Feb-11 11:23 
GeneralRe: Help with excel and hyperlinks Pin
turbosupramk39-Feb-11 16:45
turbosupramk39-Feb-11 16:45 
GeneralRe: Help with excel and hyperlinks Pin
turbosupramk310-Feb-11 5:32
turbosupramk310-Feb-11 5:32 
AnswerRe: Help with excel and hyperlinks Pin
Luc Pattyn9-Feb-11 13:12
sitebuilderLuc Pattyn9-Feb-11 13:12 
GeneralRe: Help with excel and hyperlinks Pin
Dalek Dave9-Feb-11 13:32
professionalDalek Dave9-Feb-11 13:32 
GeneralRe: Help with excel and hyperlinks Pin
Luc Pattyn9-Feb-11 14:01
sitebuilderLuc Pattyn9-Feb-11 14:01 
GeneralRe: Help with excel and hyperlinks Pin
turbosupramk39-Feb-11 16:39
turbosupramk39-Feb-11 16:39 
AnswerRe: Help with excel and hyperlinks - ANWSER HERE Pin
turbosupramk310-Feb-11 10:35
turbosupramk310-Feb-11 10:35 
QuestionDesktop application and DB on web server Pin
AlexB479-Feb-11 5:36
AlexB479-Feb-11 5:36 
AnswerRe: Desktop application and DB on web server Pin
#realJSOP9-Feb-11 5:40
professional#realJSOP9-Feb-11 5:40 
GeneralRe: Desktop application and DB on web server Pin
Manfred Rudolf Bihy9-Feb-11 7:53
professionalManfred Rudolf Bihy9-Feb-11 7:53 
AnswerRe: Desktop application and DB on web server Pin
Eddy Vluggen9-Feb-11 6:33
professionalEddy Vluggen9-Feb-11 6:33 

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.