Welcome to MSDN Blogs Sign in | Join | Help

Wriju's BLOG

.NET and everything
VB.NET 10 : Nullable Optional Parameter

You can create method with optional parameter and also make them Nullable.

Optional with default value

Sub Test(ByVal _name As String, ByVal _email As String, Optional ByVal _age As Integer = 30)

 

Optional and Nullable

Sub Test(ByVal _name As String, ByVal _email As String, Optional ByVal _age As Integer? = Nothing)

Similarly you also may initialize the collection like Dictionary.

Namoskar!!!

Posted: Wednesday, October 14, 2009 2:31 AM by wriju

Comments

No Comments

Leave a Comment

(required) 

(required) 

(optional)

(required) 

  
Enter Code Here: Required

Comment Notification

If you would like to receive an email when updates are made to this post, please register here

Subscribe to this post's comments using RSS

Page view tracker