VB.Net Tutorial/Class Module/Named Parameters — различия между версиями
Admin (обсуждение | вклад) м (1 версия) |
Admin (обсуждение | вклад) м (1 версия) |
(нет различий)
|
Текущая версия на 12:55, 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