Test.BEncodingTest.EncodingToBytes C# (CSharp) Méthode

EncodingToBytes() private static méthode

private static EncodingToBytes ( CBORObject b ) : byte[]
b CBORObject
Résultat byte[]
        private static byte[] EncodingToBytes(CBORObject b)
        {
            try {
            using (var ms = new MemoryStream()) {
              BEncoding.Write(b, ms);
              return ms.ToArray();
            }
              } catch (IOException ex) {
            throw new CBORException(String.Empty, ex);
              }
        }