문제

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 ?

올바른 솔루션이 없습니다

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top