 <p>"== false" is not very readable. Use ! instead.</p> <p>If the "object value" is already of desired type (e.g. DateTime), it would be slower to convert it to string and then back again.</p> <p>I would write instead</p> <pre><code>if (value is DateTime) return (DateTime)value; </code></pre> <p>I would not use var result = -999; as a return value.</p> <p>If the conversion fails, you can either return Int32.MinValue (better than -999) or rather null.</p> <p>Maybe also you would like to check for DBNull.Value? So first I would check for null and DBNull.Value, then "value is DateTime" check and the last thing would be DateTime.TryParse.</p>