Sub AcceptingParms(parmNullsOK As Integer?)
If parmNullsOK IsNot Nothing Then
You're not limited to using the question mark in parameters or with the Integer/int datatype. You can use it on any value type where you're willing to accept a null/Nothing value. Do be aware, though, that these nullable types are a different datatype from their non-nullable cousins (i.e. int? is not int and Integer? is not Integer). So if you want to use a nullable value with a non-nullable value, you'll have to do a conversion:
Dim res As Integer
Dim num? As Integer = 2
res = Integer.Parse(num) + Integer.Parse(num)
What you're actually doing when you add the question mark to the end of your datatype is creating an instance of a reference class called System.Nullable<T>. To put it another way, int? is the same as System.Nullable<int>). The question mark is just shorthand for the longer declaration.
Posted by Peter Vogel on 06/07/2011 at 1:16 PM
User experience expert Debbie Levitt provided some saucy answers about an upcoming Visual Studio Live! presentation with an even saucier title: Fast Focus: WTF UX - UX Research and Design AMA.
Developers can now sign up for a private preview of enhanced chat capabilities coming to GitHub Copilot, the "AI pair programmer" that works in the Visual Studio 2022 IDE and in Visual Studio Code.
With advanced generative AI systems reshaping software development, Microsoft's Mads Kristensen detailed the many ways AI will improve coding in Visual Studio.
With Google recently releasing a generative AI-powered search bot called Bard to rival Microsoft's "new Bing" search experience, we put both to the test, feeding them identical questions about Visual Studio and .NET.
GPT-4, the advanced generative AI model from Microsoft partner OpenAI, is now powering the new GitHub Copilot X and the Azure OpenAI Service.
> More Webcasts