任何人都可以帮助我将此vbscript转换为vb.net吗?

时间:2010-11-12 17:58:42

标签: vb.net vbscript

Function Main()
  DTSGlobalVariables("bolFirstRecord").Value = True
  Main = DTSTaskExecResult_Success
End Function

1 个答案:

答案 0 :(得分:0)

正如Oded所指出的那样,在这件事情上有很多信息可以告诉你,但我认为你需要这样的事情:

Public Class MyForm1
  Private bolFirstRecord As Boolean

  Public Property FirstRecord() As Boolean
    Get
        Return bolFirstRecord
    End Get
    Set(ByVal value As Boolean)
        bolFirstRecord = value
    End Set
  End Property

  Public Function Main() As Boolean
     Try
        Me.FirstRecord = True
        Return True
     Catch ex as Exception
        Return False
     End Try
  End Function

End Class