persol
New member
- Joined
- May 29, 2008
- Messages
- 4
- Programming Experience
- Beginner
Hi, I want to call a calculation from a class into my forum. I just keep getting zero. I want
form1.
to show calculation ofMessageBox.Show(FormatNumber(school.Ratio, 1))
from my class. here is my code. What am I doing wrong?numstudents / numfaculty
form1.
VB.NET:
Public Class college
Dim name As String
Dim numstudents As Integer
Dim numfaculty As Integer
Dim SFRatio As Double
Public Property collegeName() As String
Get
Return name
End Get
Set(ByVal value As String)
name = value
End Set
End Property
Public Property StudentAmnt() As String
Get
Return numstudents
End Get
Set(ByVal value As String)
numstudents = value
End Set
End Property
Public Property facltyNum() As String
Get
Return numfaculty
End Get
Set(ByVal value As String)
numfaculty = value
End Set
End Property
Public Property Ratio() As Decimal
Get
Return SFRatio = numstudents / numfaculty
End Get
Set(ByVal value As Decimal)
SFRatio = value
End Set
End Property
End Class