Use String. IsNullOrEmpty() to check null value

Sourav.Kayal
Posted by Sourav.Kayal under C# category on | Points: 40 | Views : 887
using System;
using System.Linq;
using System.Text;
using System.Collections;
using System.Data;
using System.Xml;
using System.IO;
using System.Diagnostics;
using System.Collections.Generic;

namespace BlogProject
{
class Program
{
static void Main(string[] args)
{
string Value = null;

if (String.IsNullOrEmpty(Value)) //Check wheather value is null or not
{
Console.WriteLine("Null");
}


Console.ReadLine();
}
}
}

Comments or Responses

Login to post response