How to generalize a method
<p>I have a method which I want to generalize. I want to use following Deserialize function for any object type, as belew:</p>

<pre><code>ExportDefinition _expDefinition = new ExportDefinition("a.ini");
DeliveryDefinition _delDefinition = new DeliveryDefinition("b.ini");

ExportDefinition expDef = Deserialize(_expDefinition);
DeliveryDefinition devDef = Deserialize(_delDefinition);
</code></pre>

<p><p></p>

<pre><code>public SomeType Deserialize(SomeType?? tp)  // What should I use instead of SomeType?
{     
    try
    {
        FileStream readFileStream = new FileStream(definitionFile, FileMode.Open, FileAccess.Read, FileShare.Read);

        XmlSerializer serializerObj = new XmlSerializer(typeof(tp));
        tp loadedObj = (tp)serializerObj.Deserialize(readFileStream);
        readFileStream.Close();
     }
     catch (Exception ex)
     {
        throw new Exception(ex.Message);
     }

     return loadedObj;
}
</code></pre>

<p>Any ideas, how to achieve this?</p>
