protected void cast_ifnotnull(H from_here, ref T to_value) where T : System.IConvertible
{
if (from_here != null)
to_value = (T)Convert.ChangeType(from_here, typeof(T), CultureInfo.InvariantCulture);
else to_value = default(T);
}
protected T cast_ifnotnull(H from_here) where T : System.IConvertible
{
if (from_here != null)
return (T)Convert.ChangeType(from_here, typeof(T), CultureInfo.InvariantCulture);
else return default(T);
}
Non so. Non mi convince ancora.