Hardly.StringHelpers.ToBytesEncoded C# (CSharp) Method

ToBytesEncoded() public static method

public static ToBytesEncoded ( this data ) : byte[]
data this
return byte[]
        public static byte[] ToBytesEncoded(this string data)
        {
            try {
                return Encoding.UTF8.GetBytes(data);
            } catch(Exception e) {
                Log.exception(e);

                return null;
            }
        }