SharpOSC.OscPacket.setString C# (CSharp) Méthode

setString() protected static méthode

protected static setString ( string value ) : byte[]
value string
Résultat byte[]
        protected static byte[] setString(string value)
        {
            int len = value.Length + (4 - value.Length % 4);
            if (len <= value.Length) len = len + 4;

            byte[] msg = new byte[len];

            var bytes = Encoding.ASCII.GetBytes(value);
            bytes.CopyTo(msg, 0);

            return msg;
        }