'別クラス Class Hoge ' 終了処理を行うか判定 Private flgEndLoop As Boolean ''' <summary> ''' 終了処理を行うか? ''' </summary> Public Property IsEndLoop() As Boolean Private Get Return Me.flgEndLoop End Get Set(ByVal value As Boolean) Me.flgEndLoop = value End Set End Property ''' <summary> ''' ひたすらHogeを表示する。 ''' </summary> Public Sub HogeShow() ' カウント Dim sCount As Short = 0 While True If Not IsEndLoop Then Console.WriteLine("Hoge:" & sCount) sCount += 1 System.Threading.Thread.Sleep(100) Else Return End If End While End Sub End Class