我有以下 VB 函数,它将 FileInfo 对象作为参数:
Public Shared Shadows Sub Start(ByVal filePath As FieldInfo)
XmlConfigurator.ConfigureAndWatch(New System.IO.FileInfo(filePath.ToString()))
End Sub
在另一个类中,我有以下代码调用该“开始”方法。但是 VisStudio 表明我传递的“FilePath”参数存在问题。提前致谢!
'Initialize FileInfo object to pass to Start method
Dim path As String = Dim filePath As FileInfo = New FileInfo(path)
LoggingManager.Start(**FilePath**)