technomark.in
Hot News

$(this) Selector And Children / Find In jQuery

Detect An Undefined Object Property In JavaScript

Rotate And Save Video Using VLC Media Player

Capitalize The First Letter Of String In JavaScript

Convert Any Files To Any Format Using VLC Media Player

Asp.Net AngularJS WCF IIS
DataBase Jquery Bikes Random
HomeContact Us Watch Our YouTube Channel ..........Blog Spot..........

Technomark.in

How To Logout From All Devices In Skype

Technomark.in

How To Embed Google Map In Your Code

Technomark.in

How To Install IIS (Internet Information Services) On Windows

Technomark.in

Enable Directory Browsing In IIS

View All


Convert Byte Array To Hexadecimal String And Vice Versa


Convert Byte Array to Hexadecimal String In Asp.Net

> Here we consider, how to convert Byte Array to Hexadecimal String.
> We can make use of BitConverter for doing this job.
> One typical example is given below for Byte Array to Hexadecimal String conversion.

public string ConvertByteArrayToString( byte[] byteArray )
{
     string hexString = BitConverter.ToString( byteArray );
     return hexString.Replace( "-", "" );
}



Convert Hexadecimal String To Byte Array In Asp.Net

> Here we consider, how to convert Hexadecimal String To Byte Array.
> Try following code to convert Hexadecimal String To Byte Array.

public byte[ ] ConvertHexStringToByteArray( String hexString )
{
     int TotalNumberOfChars = hexString.Length;
     byte[ ] bytesArray = new byte[ TotalNumberOfChars / 2 ];
     for ( int i = 0; i < TotalNumberOfChars; i += 2 )
     {
          bytesArray[ i / 2 ] = Convert.ToByte( hexString.Substring(i, 2), 16 );
     }
      return bytesArray;
}




Watch Video of this Content on Video Streaming

Post Your Comment

Name *


Email *


Comment * Please provide all three fields for posting Comment




Technomark.in

Book Train Tickets on IRCTC Quickly During Tatkal Period

Technomark.in

Before You Copy Any Image From Internet

View All

Privacy StatementDisclaimerSitemap