T
tshad
I have a function that I want to pass data that gets data from my Sql
Database, so the value can be null but I get an error if I try it.
The type 'string' must be a non-nullable value type in order to use it
as parameter 'T' in the generic type or method 'System.Nullable<T>'
This works:
public void test(int? x){}
But this doesn't:
public void test(string? x){}
How can I get this to work?
I am using a dbReader and putting the data into a string or int or double
and then passing it to its functions.
Can you pass just a row of the dbReader?
Thanks,
Tom
Database, so the value can be null but I get an error if I try it.
The type 'string' must be a non-nullable value type in order to use it
as parameter 'T' in the generic type or method 'System.Nullable<T>'
This works:
public void test(int? x){}
But this doesn't:
public void test(string? x){}
How can I get this to work?
I am using a dbReader and putting the data into a string or int or double
and then passing it to its functions.
Can you pass just a row of the dbReader?
Thanks,
Tom