C# A problem with return T
<p>I have a method that converts a number from string to the T, e.g <code>int</code></p>

<pre><code>public static T GetItemIdFromUrl&lt;T&gt;(string itemName)
{
   try
   {
      ...
      int ad_id = int.Parse(stringNumber);

      return (T)(object)ad_id;
   }
   catch 
   {
      return (T)(object)-1;
   }
}
</code></pre>

<p>but as a result I have a hex code <code>0xffffffa5</code> instead of <code>91</code>. Why ?</p>
