System.Xml.Serialization.XmlSerializationWriter.FromByteArrayBase64 C# (CSharp) Method

FromByteArrayBase64() protected static method

protected static FromByteArrayBase64 ( byte value ) : byte[]
value byte
return byte[]
        protected static byte[] FromByteArrayBase64(byte[] value)
        {
            // Unlike other "From" functions that one is just a place holder for automatic code generation.
            // The reason is performance and memory consumption for (potentially) big 64base-encoded chunks
            // And it is assumed that the caller generates the code that will distinguish between byte[] and string return types
            //
            return value;
        }

Usage Example

 internal void Write_base64Binary(object o)
 {
     base.WriteStartDocument();
     if (o == null)
     {
         base.WriteNullTagLiteral("base64Binary", "");
     }
     else
     {
         base.TopLevelElement();
         base.WriteNullableStringLiteralRaw("base64Binary", "", XmlSerializationWriter.FromByteArrayBase64((byte[])o));
     }
 }