Is This Content Helpful?
We're glad to know this article was helpful.
Programming in C# within Visual Studio 2005 (.NET 2.0) can lead to the following error message:
"Cannot implicitly convert type '[type]?' to '[type]'. An explicit conversation exists (are you missing a cast?)"
In the .NET Framework 2.0, C# nullable data types are denoted with a question mark. 'int' must be set, but 'int?' may be null.
For nullable data types, add a question mark to the end when declaring it.
For example, to declare a nullable integer named test: