C# : return dbnull.value or system.type from function?
-
30-10-2019 - |
Frage
I want to create a function (c#):
int PutInt (int? x)
{
if (x.HasValue)
return x.Value;
else
return DBNull.Value;
}
but there is no cast from int to DBNull.Value. Is there any way to create such a function ?
Keine korrekte Lösung
Lizenziert unter: CC-BY-SA mit Zuschreibung
Nicht verbunden mit StackOverflow