CSharp examples for System:Byte
Convert String To Bytes
using System.Text; using System.Linq; using System.Collections.Generic; using System;/* w ww .jav a 2 s.co m*/ public class Main{ public static byte[] ConvertStringToBytes(string str) { return str.ToArray().Select(s => (byte)s).ToArray(); } }