I'm looking access private member of a class in myproject.vb file. My function header in myproject.vb looks like this,
Public Function MyVbFunction(ByVal objRequest As BookRequest) As Integer
Try
For Each book As Book In objRequest.m_Books
If Myvbfucntion2(book) = 1 Then
Return True
End If
Next
End Try
End Function
Book Request Class has property m_Books as Private of type BookCollection class
Public Class BookRequest
Private m_Books As ExamCollection
'
'
'
End Function
It is not allowing me to access 'book', showing as m_Books as private member. How can i access m_Books to pass to Myvbfucntion2.
You could make a public property and use the get and set functions to tie your property to a private member if you wish.
Apologies for any code formatting issues. I wrote this on my mobile phone