Hi i am new in vb. i am trying to declare classe in which i used event. but i got the errors just like Error 1 Name 'mintCapacity' is not declared. or Error 5 Name 'mstrName' is not declared. below is the code. Kindly help me.Thanks in advance.
Public Class Buket
Private ContentsValue As Integer
Private CapacityValue As Integer
Private NameValue As String
Public Event Full()
Public Event Overflowing(ByVal Sender As System.Object)
Public Sub New(ByVal Capacity As Integer)
mintCapacity = Capacity
mintContents = 0
End Sub
Public Sub Empty()
mintContents = 0
End Sub
Public ReadOnly Property Contents()
Get
Contents = mintContents
End Get
End Property
Public Property Name() As String
Get
Name = mstrName
End Get
Set(ByVal value As String)
mstrName = value
End Set
End Property
Public Sub Add(ByVal Amouunt As Integer)
mintcontents = mintcounts + Amount
If mintcontents > mintcapacity Then
RaiseEvent Overflowing(Me)
mintcontents = mintcapaicty
ElseIf mintcontents = mintcapacity Then
RaiseEvent Full()
End If
End Sub
End Class
Public Class Buket
Private ContentsValue As Integer
Private CapacityValue As Integer
Private NameValue As String
Public Event Full()
Public Event Overflowing(ByVal Sender As System.Object)
Public Sub New(ByVal Capacity As Integer)
mintCapacity = Capacity
mintContents = 0
End Sub
Public Sub Empty()
mintContents = 0
End Sub
Public ReadOnly Property Contents()
Get
Contents = mintContents
End Get
End Property
Public Property Name() As String
Get
Name = mstrName
End Get
Set(ByVal value As String)
mstrName = value
End Set
End Property
Public Sub Add(ByVal Amouunt As Integer)
mintcontents = mintcounts + Amount
If mintcontents > mintcapacity Then
RaiseEvent Overflowing(Me)
mintcontents = mintcapaicty
ElseIf mintcontents = mintcapacity Then
RaiseEvent Full()
End If
End Sub
End Class