.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
 
Sign In
Register
 
Win Surprise Gifts!!!
Congratulations!!!


Top 5 Contributors of the Month
david stephan

Home >> Forum >> Windows Application >> Post New QuestionBookmark and Share Subscribe to Forum

Exception

Posted By: Naim Khan     Posted Date: January 21, 2009    Points:2   Category :Windows Application
Hello sir .

I have Exception when i m insert values in textbox .i dont understand wht is the meaning of that.
"system.nullReferenceException :Object refrence not set to an Istance of an Object"

Plz solved it

Thanks in Advance
Naim Khan

Responses
Author: Praveen             
Posted Date: January 22, 2009     Points: 5   

Hi Naim,
this exception throw when you are trying to get the value which is null or when you are trying to assign the object which is null. The better way to check the object before assigining the value to object like this


if(obj != null)
{
// your logic goes here
}


Happy Coding!!!



Post Reply

You must Sign In To post reply
 
 
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery
JavaScript/VBScriptBiztalkWPFPatten/PracticesWCFOthers
www.DotNetSpark.comUnAnsweredAll

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend