Классы в VBScript: почему эти два примера делают одно и то же?

Я нашел этот кусок кода в этом вопросе StackOverFlow,Словарь объектов / классов в VBScript.

Мой вопрос, почему это "короткая" класс делает то же самое, что и этотдолго" учебный класс? Зачем вообще кодировать длинный класс? Может ли версия короткого класса использоваться с дополнительными методами в том же классе? Спасибо!

Короткий класс

Class employeeclass
    Public first, last, salary
End Class

Длинный класс

Class employeeclass
    Private m_first
    Private m_last
    Private m_salary

    Public Property Get first
        first = m_first
    End Property
    Public Property Let first(value)
        m_first = value
    End Property

    Public Property Get last
        last = m_last
    End Property
    Public Property Let last(value)
        m_last = value
    End Property

    Public Property Get salary
        salary = m_salary
    End Property
    Public Property Let salary(value)
        m_salary = value
    End Property
End Class

Полный сценарий с коротким классом, однако, просто замените короткий класс длинным классом и получите тот же результат.

Class employeeclass
    Public first, last, salary
End Class

Dim employeedict: Set employeedict = CreateObject("Scripting.Dictionary")

Dim employee: Set employee = new employeeclass
With employee
    .first = "John"
    .last = "Doe"
    .salary = 50000
End With
employeedict.Add "1", employee

Set employee = new employeeclass
With employee
    .first = "Mary"
    .last = "Jane"
    .salary = 50000
End With
employeedict.Add "3", employee

Dim employeedetails: Set employeedetails = employeedict.Item("1")
WScript.Echo "Name: " & employeedetails.first & " " & employeedetails.last & " $" & employeedetails.salary 
WScript.Echo employeedict.Item("3").first & " " & employeedict.Item("3").last & " makes $" & employeedict.Item("3").salary

Ответы на вопрос(3)

Ваш ответ на вопрос