Public Class Math
Private intvalue As Integer
Public Property InValues() As Integer
Get
Return intvalue
End Get
Set(ByVal value As Integer)
' If value > 0 Then
intvalue = value
'Else
'Throw New Exception("InValue can not be less than 1")
'End If
End Set
End Property
Private Function multiply(ByVal FirstValue As Integer, ByVal SecondValue As Integer) As Integer
Return FirstValue * SecondValue
End Function
Public Function MultiplyBySelf() As Integer
Return multiply(InValues, InValues)
End Function
End Classقمت ببناء هذا الكلاس وأنشأت ملف الـ dll ثم قمت باستدعائه من داخل مشروعي الآخر لكي اقوم بتجربته هنا حدثت المشكله
Private math As Encapsulation.Math math.InValues = 5
لا استطيع اعطاء قيمة للمتغير حيث يخبرني انه Object reference not set to an instance of an object.
يخبر بعدم وجود المتغير




