Click here to Skip to main content
15,891,423 members
Home / Discussions / C#
   

C#

 
GeneralRe: Threading issue in winforms Pin
Mycroft Holmes1-Apr-09 17:56
professionalMycroft Holmes1-Apr-09 17:56 
GeneralRe: Threading issue in winforms Pin
N a v a n e e t h1-Apr-09 17:34
N a v a n e e t h1-Apr-09 17:34 
GeneralRe: Threading issue in winforms Pin
Mycroft Holmes1-Apr-09 17:54
professionalMycroft Holmes1-Apr-09 17:54 
GeneralRe: Threading issue in winforms Pin
N a v a n e e t h1-Apr-09 17:59
N a v a n e e t h1-Apr-09 17:59 
GeneralRe: Threading issue in winforms Pin
Mycroft Holmes1-Apr-09 18:10
professionalMycroft Holmes1-Apr-09 18:10 
GeneralRe: Threading issue in winforms Pin
N a v a n e e t h1-Apr-09 18:15
N a v a n e e t h1-Apr-09 18:15 
GeneralRe: Threading issue in winforms Pin
Luc Pattyn2-Apr-09 4:37
sitebuilderLuc Pattyn2-Apr-09 4:37 
QuestionVS 2008 Unit Testing Null Exception Error Pin
dboy2211-Apr-09 15:57
dboy2211-Apr-09 15:57 
Hi,

I am attempting to unit test some code i have written. Unfortunately I am having an issue when using a generic list of an object type I have defined. I'm basically checking to see that this list is equal to 0 and if it is return false. However when the check is performed I get a null exception error. Below is an example (not exact code) of the code I'm trying to test and the bold and underline is where i'm receiving the error. Thanks in advance to all that reply.

private Car _car = new Car();

//constructor
public CarValidation(Car carDetails)
{
if (carDetails == null)
throw new ArgumentNullException();
else
_car = carDetails;
}

public bool CheckForValues()
{
bool valid = true;

if(_car.OilPressure == null)
valid = false;

if (_car.TirePressure == null)
valid = false;

if (_car.GasAmount == null)
valid = false;

if (_car.Mp3SongsLoaded.Count == 0)
valid = false;


return valid;
}
AnswerRe: VS 2008 Unit Testing Null Exception Error Pin
Judah Gabriel Himango1-Apr-09 16:42
sponsorJudah Gabriel Himango1-Apr-09 16:42 
GeneralRe: VS 2008 Unit Testing Null Exception Error Pin
dboy2211-Apr-09 17:22
dboy2211-Apr-09 17:22 
QuestionCompleting a mulit-page webform using WebClient Pin
front711-Apr-09 15:18
front711-Apr-09 15:18 
QuestionComboBoxes and DataGridViews... Pin
Illegal Operation1-Apr-09 13:37
Illegal Operation1-Apr-09 13:37 
AnswerRe: ComboBoxes and DataGridViews... Pin
Mycroft Holmes1-Apr-09 16:27
professionalMycroft Holmes1-Apr-09 16:27 
GeneralRe: ComboBoxes and DataGridViews... Pin
Illegal Operation1-Apr-09 17:15
Illegal Operation1-Apr-09 17:15 
AnswerRe: ComboBoxes and DataGridViews... Pin
a.hamidy1-Apr-09 18:42
a.hamidy1-Apr-09 18:42 
QuestionSelf Update .Net application with a web service. Pin
Member 34269361-Apr-09 13:11
Member 34269361-Apr-09 13:11 
AnswerRe: Self Update .Net application with a web service. Pin
Judah Gabriel Himango1-Apr-09 16:24
sponsorJudah Gabriel Himango1-Apr-09 16:24 
Questionrename file Pin
yogesh_softworld1231-Apr-09 10:06
yogesh_softworld1231-Apr-09 10:06 
AnswerRe: rename file Pin
Pete O'Hanlon1-Apr-09 10:14
mvePete O'Hanlon1-Apr-09 10:14 
AnswerRe: rename file Pin
Giorgi Dalakishvili1-Apr-09 10:18
mentorGiorgi Dalakishvili1-Apr-09 10:18 
AnswerRe: rename file Pin
Henry Minute1-Apr-09 10:24
Henry Minute1-Apr-09 10:24 
QuestionExtracting an embedded resource file issue. Pin
astroudjr1-Apr-09 9:18
astroudjr1-Apr-09 9:18 
AnswerRe: Extracting an embedded resource file issue. Pin
Giorgi Dalakishvili1-Apr-09 10:08
mentorGiorgi Dalakishvili1-Apr-09 10:08 
AnswerRe: Extracting an embedded resource file issue. Pin
0x3c01-Apr-09 10:34
0x3c01-Apr-09 10:34 
QuestionAbout DMX protocol. Pin
pocho21011-Apr-09 8:32
pocho21011-Apr-09 8:32 

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.