Search

Jun 1, 2007

Cannot convert null to 'int' because it is a value type

Hello friends,

I found solution for the following error:

Cannot convert null to 'int' because it is a value type

when i wrote

int i = null

Now we can assign null values to such value types viz. int, datetime, float...

Check out Nullable Types

No comments: