src/Serilog.Sinks.MSSqlServer/Sinks/MSSqlServer/MSSqlServerSinkTraits.cs
/// <summary>
///     Try to convert the object to the given type
/// </summary>
/// <param name="obj">object</param>
/// <param name="type">type to convert to</param>
/// <param name="conversion">result of the converted value</param>        
Try to convert the object to the given type
Try to convert the object to the given type
private static bool TryChangeType(object obj, Type type, out object conversion)
        {
            conversion = null;
            try
            {
                conversion = Convert.ChangeType(obj, type, CultureInfo.InvariantCulture);
                return true;
            }
            catch
            {
                return false;
            }
        }
private static bool TryChangeType ( object obj , Type type , out object conversion ) { conversion = null ; try { conversion = Convert . ChangeType ( obj , type , CultureInfo . InvariantCulture ) ; return true ; } catch { return false ; } }
Try to convert the object to the given type
Try to convert the object to the given type
obj
object
None
type
Type
type to convert to
type to convert to
object
out
conversion
result of the converted value
result of the converted value