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

C#

 
AnswerRe: How Can I Add Membership To My Program Pin
Richard MacCutchan8-Sep-17 19:21
mveRichard MacCutchan8-Sep-17 19:21 
Answerjoin and sum in linqu Pin
Member 109061148-Sep-17 5:28
Member 109061148-Sep-17 5:28 
QuestionC# and XAML bindings - Need Help with events and dependent Drop Down Lists Pin
Member 133487177-Sep-17 4:45
Member 133487177-Sep-17 4:45 
AnswerRe: C# and XAML bindings - Need Help with events and dependent Drop Down Lists Pin
Mycroft Holmes7-Sep-17 13:20
professionalMycroft Holmes7-Sep-17 13:20 
Questionget more than one string in the checkedlistbox using an array C # Pin
Member 133640086-Sep-17 6:56
Member 133640086-Sep-17 6:56 
SuggestionRe: pegar mais de uma string no checkedlistbox usando um arrayList C# Pin
Richard Deeming6-Sep-17 7:07
mveRichard Deeming6-Sep-17 7:07 
QuestionError on xml.Response Pin
Bootzilla335-Sep-17 21:10
Bootzilla335-Sep-17 21:10 
AnswerRe: Error on xml.Response Pin
OriginalGriff5-Sep-17 21:19
mveOriginalGriff5-Sep-17 21:19 
This is one of the most common problems we get asked, and it's also the one we are least equipped to answer, but you are most equipped to answer yourself.

Let me just explain what the error means: You have tried to use a variable, property, or a method return value but it contains null - which means that there is no instance of a class in the variable.
It's a bit like a pocket: you have a pocket in your shirt, which you use to hold a pen. If you reach into the pocket and find there isn't a pen there, you can't sign your name on a piece of paper - and you will get very funny looks if you try! The empty pocket is giving you a null value (no pen here!) so you can't do anything that you would normally do once you retrieved your pen. Why is it empty? That's the question - it may be that you forgot to pick up your pen when you left the house this morning, or possibly you left the pen in the pocket of yesterdays shirt when you took it off last night.

We can't tell, because we weren't there, and even more importantly, we can't even see your shirt, much less what is in the pocket!

Back to computers, and you have done the same thing, somehow - and we can't see your code, much less run it and find out what contains null when it shouldn't.
But you can - and Visual Studio will help you here. Run your program in the debugger and when it fails, VS will show you the line it found the problem on. You can then start looking at the various parts of it to see what value is null and start looking back through your code to find out why. So put a breakpoint at the beginning of the method containing the error line, and run your program from the start again. This time, VS will stop before the error, and let you examine what is going on by stepping through the code looking at your values.

But we can't do that - we don't have your code, we don't know how to use it if we did have it, we don't have your data. So try it - and see how much information you can find out!
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

AnswerRe: Error on xml.Response Pin
Pete O'Hanlon6-Sep-17 0:30
mvePete O'Hanlon6-Sep-17 0:30 
SuggestionRe: Error on xml.Response Pin
Richard Deeming6-Sep-17 6:00
mveRichard Deeming6-Sep-17 6:00 
Questionhow to enable the USB COM Port..? Pin
Member 133808373-Sep-17 21:35
Member 133808373-Sep-17 21:35 
QuestionRe: how to enable the USB COM Port..? Pin
Jochen Arndt3-Sep-17 21:44
professionalJochen Arndt3-Sep-17 21:44 
AnswerRe: how to enable the USB COM Port..? Pin
OriginalGriff3-Sep-17 23:18
mveOriginalGriff3-Sep-17 23:18 
GeneralRe: how to enable the USB COM Port..? Pin
Jochen Arndt3-Sep-17 23:39
professionalJochen Arndt3-Sep-17 23:39 
AnswerRe: how to enable the USB COM Port..? Pin
Jochen Arndt3-Sep-17 23:49
professionalJochen Arndt3-Sep-17 23:49 
Questionbinding datagridview with entity framework Pin
Member 132649363-Sep-17 7:17
Member 132649363-Sep-17 7:17 
AnswerRe: binding datagridview with entity framework Pin
Mycroft Holmes3-Sep-17 22:49
professionalMycroft Holmes3-Sep-17 22:49 
QuestionUpdate listbox items when button is clicked Pin
Mario Lukačić3-Sep-17 2:19
Mario Lukačić3-Sep-17 2:19 
AnswerRe: Update listbox items when button is clicked Pin
Richard MacCutchan3-Sep-17 21:14
mveRichard MacCutchan3-Sep-17 21:14 
GeneralRe: Update listbox items when button is clicked Pin
Mario Lukačić4-Sep-17 2:31
Mario Lukačić4-Sep-17 2:31 
GeneralRe: Update listbox items when button is clicked Pin
Jochen Arndt4-Sep-17 3:49
professionalJochen Arndt4-Sep-17 3:49 
GeneralRe: Update listbox items when button is clicked Pin
Mario Lukačić4-Sep-17 4:01
Mario Lukačić4-Sep-17 4:01 
GeneralRe: Update listbox items when button is clicked Pin
Jochen Arndt4-Sep-17 4:39
professionalJochen Arndt4-Sep-17 4:39 
GeneralRe: Update listbox items when button is clicked Pin
Mario Lukačić4-Sep-17 5:50
Mario Lukačić4-Sep-17 5:50 
GeneralGetting file path and setting to a public variable ?!?! Pin
Mario Lukačić1-Sep-17 8:42
Mario Lukačić1-Sep-17 8:42 

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.