Tries to convert an object to a target type, handling nulls, DBNull and empty strings.
public static object SafeConvert(this object o, Type targetType)
parameter | description |
---|---|
o | Source object |
targetType | Target type |
- class ObjectExtensions
- namespace Wokhan.Core.Extensions