Click here to Skip to main content
15,889,876 members
Home / Discussions / C#
   

C#

 
GeneralRe: XML file comparison output with node names Pin
Raja Saravanan25-Sep-18 18:06
Raja Saravanan25-Sep-18 18:06 
GeneralRe: XML file comparison output with node names Pin
Pete O'Hanlon25-Sep-18 20:38
mvePete O'Hanlon25-Sep-18 20:38 
GeneralRe: XML file comparison output with node names Pin
Raja Saravanan26-Sep-18 21:02
Raja Saravanan26-Sep-18 21:02 
GeneralRe: XML file comparison output with node names Pin
Raja Saravanan2-Oct-18 20:23
Raja Saravanan2-Oct-18 20:23 
GeneralRe: XML file comparison output with node names Pin
Pete O'Hanlon2-Oct-18 20:44
mvePete O'Hanlon2-Oct-18 20:44 
GeneralRe: XML file comparison output with node names Pin
Raja Saravanan3-Oct-18 17:14
Raja Saravanan3-Oct-18 17:14 
QuestionIssue with Land Registry Service reference.cs Pin
Member 1387432624-Sep-18 3:57
Member 1387432624-Sep-18 3:57 
AnswerRe: Issue with Land Registry Service reference.cs Pin
OriginalGriff24-Sep-18 4:08
mveOriginalGriff24-Sep-18 4:08 
Do us all a favour and don't post your whole app - do you really think we want to wade through that pile of code trying to find the relevant bits?

Edit your question and cut it down to just the relevant code fragments - and then explain exactly where the problem occurs.

But in this case, we can't help you: we can't run your code in isolation, and it needs to be run under the debugger to find out what exactly is going on.

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!
Sent from my Amstrad PC 1640
Never throw anything away, Griff
Bad command or file name. Bad, bad command! Sit! Stay! Staaaay...
AntiTwitter: @DalekDave is now a follower!

AnswerRe: Issue with Land Registry Service reference.cs Pin
Richard Deeming24-Sep-18 7:56
mveRichard Deeming24-Sep-18 7:56 
GeneralRe: Issue with Land Registry Service reference.cs Pin
glennPattonWork325-Sep-18 0:52
professionalglennPattonWork325-Sep-18 0:52 
QuestionHow to get last day of specific date Pin
thepast23-Sep-18 18:11
thepast23-Sep-18 18:11 
AnswerRe: How to get last day of specific date Pin
Mycroft Holmes23-Sep-18 20:32
professionalMycroft Holmes23-Sep-18 20:32 
AnswerRe: How to get last day of specific date Pin
Maciej Los23-Sep-18 21:17
mveMaciej Los23-Sep-18 21:17 
GeneralRe: How to get last day of specific date Pin
OriginalGriff23-Sep-18 21:38
mveOriginalGriff23-Sep-18 21:38 
GeneralRe: How to get last day of specific date Pin
Maciej Los23-Sep-18 22:02
mveMaciej Los23-Sep-18 22:02 
GeneralRe: How to get last day of specific date Pin
OriginalGriff23-Sep-18 22:26
mveOriginalGriff23-Sep-18 22:26 
AnswerRe: How to get last day of specific date Pin
OriginalGriff23-Sep-18 21:38
mveOriginalGriff23-Sep-18 21:38 
AnswerRe: How to get last day of specific date Pin
Richard MacCutchan23-Sep-18 21:54
mveRichard MacCutchan23-Sep-18 21:54 
QuestionStackoverflow Pin
Thomas Kiær23-Sep-18 0:28
Thomas Kiær23-Sep-18 0:28 
AnswerRe: Stackoverflow Pin
OriginalGriff23-Sep-18 1:13
mveOriginalGriff23-Sep-18 1:13 
GeneralRe: Stackoverflow Pin
Thomas Kiær23-Sep-18 5:45
Thomas Kiær23-Sep-18 5:45 
GeneralRe: Stackoverflow Pin
OriginalGriff23-Sep-18 6:04
mveOriginalGriff23-Sep-18 6:04 
GeneralRe: Stackoverflow Pin
Thomas Kiær23-Sep-18 6:14
Thomas Kiær23-Sep-18 6:14 
GeneralRe: Stackoverflow Pin
OriginalGriff23-Sep-18 6:27
mveOriginalGriff23-Sep-18 6:27 
QuestionC# Post files through rest api error Pin
Pradeep Kumar21-Sep-18 13:07
Pradeep Kumar21-Sep-18 13:07 

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.