It is possible to use an optional parameter in VB.NET that uses a default value as shown below:
Public Function SplitAttrValue(ByVal str As String, ByRef attr As String, ByRef value As String, Optional ByVal delimiter As String = "=") As Boolean
However, here is an article that describes why you should not do this:
http://www.knowdotnet.com/articles/optionalparams.html
Main reason is that C# doesn't support them (you must use overloading).
1 comment:
Just a quick note on this old blog entry... C# does now support optional parameters, so the conclusion shown is no longer valid.
Post a Comment