logo
  • 教程列表
  • SO官方文檔
  • 使用類
    • 建立一個類
    • 使用類例項
    • 全域性工廠函式模擬引數化建構函式
    • 用於模擬引數化建構函式的 Init 方法
    • 將外部類檔案載入到指令碼中
  1. StackOverflow 文件
  2. vbscript 教程
  3. 使用類
  4. 全域性工廠函式模擬引數化建構函式

全域性工廠函式模擬引數化建構函式

Created: November-22, 2018

' Making a factory with parameter to the class
Public Function new_Car(wheels)
    Set new_Car = New Car
    new_Car.Wheels = wheels
End Function

' Creating a car through a factory
Dim semiTrailer
Set semiTrailer = new_Car(18)
  • 用於模擬引數化建構函式的 Init 方法
  • 使用類例項

Copyright © 2018. All right reserved

tastones.com 备案号:鲁ICP备18045372号-1

  • 關於本站
  • 免責聲明