Friday 29 September 2017

Converting string to byte array in C#

public static byte[] ToByteArray(this string str)
{
    return System.Text.Encoding.ASCII.GetBytes(str);
}

No comments:

Post a Comment

Note: only a member of this blog may post a comment.

Blog Archive