Convert To Byte Array - CSharp System

CSharp examples for System:Converter

Description

Convert To Byte Array

Demo Code


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

public class Main{
        internal static byte[] ConvertToByteArray(object value)
        {
            byte[] byteArrayValue = null;
            if (!Convert.IsDBNull(value))
            {
                byteArrayValue = (byte[])value;
            }
            return byteArrayValue;
        }
}

Related Tutorials