FloatingQueue.Common.TCP.TCPBinaryWriter.WriteObject C# (CSharp) Method

WriteObject() public method

public WriteObject ( object obj ) : void
obj object
return void
        public void WriteObject(object obj)
        {
            var type = obj.GetType();
            Write(type.Name);
            if (type == typeof(string))
                Write((string)obj);
            else if (type == typeof(byte[]))
                Write((byte[])obj);
            else
                throw new NotSupportedException("Serialization is not suuported for of object " + type.Name);
        }