开发者

its possible to put a default value to a parameter of a function in VB.NET

开发者 https://www.devze.com 2023-01-29 14:20 出处:网络
its开发者_如何学C just like that in other langauges (php in the example) function myFunction($message,$sender=\"nodoby\") {

its开发者_如何学C just like that in other langauges (php in the example)

function myFunction($message,$sender="nodoby") {
return $message." by ".$sender;
}

no body told me use overload !!!


You could use

Public Function MyFun(Optional myParam As String = "MyDefaultValue")
0

精彩评论

暂无评论...
验证码 换一张
取 消