From: Mr. X. on 11 Jun 2010 05:49 Hello. I have a control : public class myClass private class myInnerClass ... end class end class How myInnerClass can access myClass ? Need sample, please. Thanks :)
From: Phill W. on 11 Jun 2010 06:57 On 11/06/2010 10:49, Mr. X. wrote: > Hello. > I have a control : > public class myClass > private class myInnerClass > ... > end class > > end class > > How myInnerClass can access myClass ? Public Class 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.
From: Armin Zingler on 11 Jun 2010 07:52 Am 11.06.2010 11:49, schrieb Mr. X.: > Hello. > I have a control : > public class myClass > private class myInnerClass > ... > end class > > end class > > How myInnerClass can access myClass ? Which instance of myClass? There can be 0 to many instances. > Need sample, please. > > Thanks :) -- Armin
|
Pages: 1 Prev: VB copy files from one folder to other Next: Problem with query dates |