Convert To String - CSharp System

CSharp examples for System:Converter

Description

Convert To String

Demo Code


using System.Data.SqlClient;
using System.Data;
using System.Collections.Generic;
using System;//from   w ww  .  j av  a2 s  .c o  m

public class Main{
        internal static string ConvertToString(object value)
        {
            string strValue = string.Empty;
            if (!Convert.IsDBNull(value))
            {
                strValue = Convert.ToString(value);
            }
            return strValue;
        }
}

Related Tutorials