VB.Net学习笔记

前端之家收集整理的这篇文章主要介绍了VB.Net学习笔记前端之家小编觉得挺不错的,现在分享给大家,也给大家做个参考。

定时器

Private objTimer As System.Threading.Timer
Public Sub New()
    Dim tcb As New System.Threading.TimerCallback(AddressOf TimerMethod)
    objTimer = New System.Threading.Timer(tcb,Nothing,TimeSpan.FromSeconds(1),TimeSpan.FromSeconds(10))
End Sub
Private Sub TimerMethod()
    objTimer.Dispose()
End Sub

获取dll路径(含名称):

Dim s As String
s = Assembly.GetExecutingAssembly().Location

获取dll版本号:

Dim s As String s = Assembly.GetExecutingAssembly().GetName().Version.ToString()

猜你在找的VB相关文章