Quantcast
Channel: VBForums - Visual Basic .NET
Viewing all articles
Browse latest Browse all 27209

VS 2010 stopwatch class problem

$
0
0
Hi folks. For the below code, I am getting a wavy line under sw.start(), with the error message 'start" is not a member of 'Stopwatch.Stopwatch'. Why is start not a member of the stopwatch class?? Thanks in advance.

Code:

Public Class Form1
    Private Sub Button1_Click(sender As System.Object, e As System.EventArgs) Handles bttnStartStop.Click
        If bttnStartStop.Text = "Start" Then
            bttnStartStop.Text = "Stop"
        ElseIf bttnStartStop.Text = "Stop" Then
            bttnStartStop.Text = "Start"
        End If
        Dim sw As StopWatch
        sw.start()
    End Sub
End Class


Viewing all articles
Browse latest Browse all 27209

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>