There is nothing wrong per-se with the code you have: that compiles fine:
class SerializableEntity<T> {
    public SerializableEntity(T obj) { }
}
static class P {
    public static void serialize<T>(T serializeObject) {
        //this is fine...
        SerializableEntity<T> entity =
            new SerializableEntity<T>(serializeObject);
    }
    static void Main() { /*...*/ }
}
So the real question is: what does the compiler say? The most obvious one would be if it says something like:
The type 'T' must be a reference type in order to use it as parameter 'T' in the generic type or method 'SerializableEntity<T>'
which is a "constraint" violation; if that is what you are seeing you need to add the constraints to serialize<T> to prove to the compiler that the constraints are always satisfied. For example, if SerializableEntity<T> is declared as:
class SerializableEntity<T> where T : class
{...}
then you simply transfer that constraint to the method:
public static void serialize<T>(T serializeObject) where T : class
{...}
Note that other constraints are possible, including:
- : class
- : struct
- : SomeBaseType
- : ISomeInterface
- : new()