|
web
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
Inner class problem.Hello.
I have a control : public class myClass private class myInnerClass ... end class end class How myInnerClass can access myClass ? Need sample, please. Thanks :) On 11/06/2010 10:49, Mr. X. wrote:
> Hello. Public Class myClass> I have a control : > public class myClass > private class myInnerClass > ... > end class > > end class > > How myInnerClass can access myClass ? Private Class myInnerClass Private Sub New() End Sub ' "Friend" just in case we ever make this class Public. ' Only code in this Assembly can create these. Friend Sub New( byval parent as myClass ) m_parent = parent End Sub Private m_parent as myClass = Nothing Private ReadOnly Property Parent() as myClass Get Return m_parent End Get End Property End Class End Class Code within myInnerClass should reference the parent object by Me.Parent. ... HTH, Phill W. Am 11.06.2010 11:49, schrieb Mr. X.:
> Hello. Which instance of myClass? There can be 0 to many instances.> I have a control : > public class myClass > private class myInnerClass > ... > end class > > end class > > How myInnerClass can access myClass ? Show quoteHide quote > Need sample, please. > > Thanks :) -- Armin
VB copy files from one folder to other
elearning info not working in dotnet ide can you return to previous position logging to text file and opening at end of program Creating an event by force. Make a component on runtime. Inheritance and COM checking whether the current object is a specific class. Datagridview selected rows ToolStrip - how I can make rectangle on the last selected item ? |
|||||||||||||||||||||||