Why would a null char returned from a DB cause an error.
public static object SetNull(PropertyInfo objPropertyInfo)
{
object functionReturnValue = null;
switch (objPropertyInfo.PropertyType.ToString())
{
case "System.Char":
functionReturnValue = "";
// functionReturnValue = char.MinValue;
}
}
In the above code you can see that if the Char is null we set it to “”. The MinValue was just me testing it and that made the error worse.
Now mind you that that error doesnt cause an issue on all Char Null fields — just some random ones.
5