VB.Net Tutorial/Class Module/Named Parameters
Версия от 16:40, 26 мая 2010; (обсуждение)
Use named parameters
Option Strict On
Public Class Person
Private firstName As String
Private middleName As String
Private lastName As String
Public Sub New(firstName As String, middleName As String , lastName As String)
Me.firstName = firstName
Me.middleName = middleName
me.lastName = lastName
End Sub
End Class
Public Module CallingFunctions
Public Sub Main()
Dim person2 As New Person("John", "J.", "Smith")
Dim person1 As New Person(firstName := "John", lastName := "Smith", middleName := "J.")
End Sub
End Module