Click here to Skip to main content
15,881,715 members
Home / Discussions / C#
   

C#

 
AnswerRe: In C# can't introduce a formula in Excel Pin
Gerry Schmitz27-Jul-22 14:47
mveGerry Schmitz27-Jul-22 14:47 
GeneralRe: In C# can't introduce a formula in Excel Pin
Ismael_199928-Jul-22 7:53
Ismael_199928-Jul-22 7:53 
QuestionI having this error could anyone can help me :Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at ValidParenthese.Solution.IsValid (System.String s) [0x00000] in <89120c6f256647e6a05011f274f6a Pin
swethamaddi26-Jul-22 23:20
swethamaddi26-Jul-22 23:20 
AnswerRe: I having this error could anyone can help me :Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at ValidParenthese.Solution.IsValid (System.String s) [0x00000] in <89120c6f256647e6a05011f27 Pin
Richard MacCutchan26-Jul-22 23:51
mveRichard MacCutchan26-Jul-22 23:51 
AnswerRe: I having this error could anyone can help me :Unhandled Exception: System.NullReferenceException: Object reference not set to an instance of an object at ValidParenthese.Solution.IsValid (System.String s) [0x00000] in <89120c6f256647e6a05011f27 Pin
Dave Kreskowiak27-Jul-22 6:57
mveDave Kreskowiak27-Jul-22 6:57 
QuestionWhat Is NullReferenceException? Object reference not set to an instance of an object i have error how to change code unable to excute below code could help me Pin
swethamaddi26-Jul-22 23:15
swethamaddi26-Jul-22 23:15 
AnswerRe: What Is NullReferenceException? Object reference not set to an instance of an object i have error how to change code unable to excute below code could help me Pin
Richard MacCutchan26-Jul-22 23:51
mveRichard MacCutchan26-Jul-22 23:51 
AnswerRe: What Is NullReferenceException? Object reference not set to an instance of an object i have error how to change code unable to excute below code could help me Pin
OriginalGriff27-Jul-22 0:04
mveOriginalGriff27-Jul-22 0:04 
To add to what Richard has said ...

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 yesterday's 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, it 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, the debugger 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!
"I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
"Common sense is so rare these days, it should be classified as a super power" - Random T-shirt
AntiTwitter: @DalekDave is now a follower!

AnswerRe: What Is NullReferenceException? Object reference not set to an instance of an object i have error how to change code unable to excute below code could help me Pin
Calin Negru28-Jul-22 0:11
Calin Negru28-Jul-22 0:11 
QuestionHow to convert pdf file into FileStream? Pin
Code4Ever26-Jul-22 6:35
Code4Ever26-Jul-22 6:35 
GeneralRe: How to convert pdf file into FileStream? Pin
Richard MacCutchan26-Jul-22 6:49
mveRichard MacCutchan26-Jul-22 6:49 
GeneralRe: How to convert pdf file into FileStream? Pin
Code4Ever26-Jul-22 6:59
Code4Ever26-Jul-22 6:59 
GeneralRe: How to convert pdf file into FileStream? Pin
Richard Deeming26-Jul-22 22:03
mveRichard Deeming26-Jul-22 22:03 
GeneralRe: How to convert pdf file into FileStream? Pin
Code4Ever28-Jul-22 19:52
Code4Ever28-Jul-22 19:52 
AnswerRe: How to convert pdf file into FileStream? Pin
Dave Kreskowiak26-Jul-22 7:24
mveDave Kreskowiak26-Jul-22 7:24 
GeneralRe: How to convert pdf file into FileStream? Pin
Code4Ever26-Jul-22 7:39
Code4Ever26-Jul-22 7:39 
GeneralRe: How to convert pdf file into FileStream? Pin
Dave Kreskowiak26-Jul-22 7:45
mveDave Kreskowiak26-Jul-22 7:45 
QuestionTechnic or best way to know if an application is "ready" when it is started from another application ? Pin
Maximilien25-Jul-22 1:14
Maximilien25-Jul-22 1:14 
AnswerRe: Technic or best way to know if an application is "ready" when it is started from another application ? Pin
Richard MacCutchan25-Jul-22 3:08
mveRichard MacCutchan25-Jul-22 3:08 
AnswerRe: Technic or best way to know if an application is "ready" when it is started from another application ? Pin
Gerry Schmitz27-Jul-22 6:43
mveGerry Schmitz27-Jul-22 6:43 
QuestionAsync web request Pin
moxol23-Jul-22 11:06
moxol23-Jul-22 11:06 
AnswerRe: Async web request Pin
Gerry Schmitz23-Jul-22 14:48
mveGerry Schmitz23-Jul-22 14:48 
QuestionPlease give me some explaination about the following Microsoft.ToolKit.MVVM Pin
Code4Ever23-Jul-22 7:17
Code4Ever23-Jul-22 7:17 
AnswerRe: Please give me some explaination about the following Microsoft.ToolKit.MVVM Pin
OriginalGriff23-Jul-22 9:18
mveOriginalGriff23-Jul-22 9:18 
QuestionClient and Server side validations for Calendar control Pin
Member 995054522-Jul-22 4:20
Member 995054522-Jul-22 4:20 

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.