Ask Learn
Preview
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign inThis browser is no longer supported.
Upgrade to Microsoft Edge to take advantage of the latest features, security updates, and technical support.
Note
Access to this page requires authorization. You can try signing in or changing directories.
Access to this page requires authorization. You can try changing directories.
If you want to assign Nothing to the optional parameter in VB.NET 10, it is just like to obvious now,
Sub Main()
'Passing value for the optional parament _age
MyFunc("Wriju", "wriju@contoso.com", 30)
'No value is supplied for the optional parament _age
MyFunc("Writam", "writam@contoso.com")
End Sub
Sub MyFunc(ByVal _name As String,
ByVal _email As String,
Optional ByVal _age As Integer? = Nothing)
Console.WriteLine("Name={0}, Email={1}, Age={2}",
_name, _email, _age.ToString())
End Sub
Namoskar!!!
Ask Learn is an AI assistant that can answer questions, clarify concepts, and define terms using trusted Microsoft documentation.
Please sign in to use Ask Learn.
Sign in