How to deserialize byte[] into generic object to be cast at method call
I am working on an object encryption class. I have everything worked out but I want to be able to encrypt/decrypt any object type with one deserialize method. As of now the only thing holding me up is the deserialize method. I have the function returning type(object) in the hopes of returning a weak typed object. It works as long as I cast the type during the return value assignment, but If I deserialize into type 'object' the result is byte[]. This means that I have to write a deserialize method for every object(T) i want to operate on. What I want to do is pass Type(T) as a parameter to the