我有两个问题:
Q1)让我们假设我有一个Logger类和程序里面叫做Log我想从其他类这样调用它,这可能吗?:
New Logger().Do("myMessage")
我试过但我能用的唯一方法是两行:
Dim log As Logger = New Logger()
log.Do("myMessage")
Q2)如果我做类库参考并放入Imports我还有义务使用长途电话,为什么?:
Imports ImportRunner 'other solution reference i added to this project
Public Class MainProcessRunner
Public Sub New()
Dim imp1 As ImportRunner.ImportRunner = New ImportRunner.ImportRunner(Date.Now)
imp1.RunDaily()
在这里,我需要使用两次:
ImportRunner.ImportRunner -instead of just once