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

Top 5 Contributors of the Month

Home >> Forum >> .NET Framework >> Post New QuestionBookmark and Share Subscribe to Forum

.net Framework

Posted By: krishana singh     Posted Date: December 07, 2010    Points:2   Category :.NET Framework
difference between null and empty?

Author: Jean Paul             
Posted Date: December 07, 2010     Points: 5   

null is used to check for objects and string;
null is unassigned reference to a variable.

empty is used to check with string

Jean Paul http://jeanpaulva.com/
Author: Asha.MP             
Posted Date: December 08, 2010     Points: 5   


Consider str is of type string
str=null means the value of str is null
str is empty means nothing is initialized to str
like str=""

Thanks and Regards,

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

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