A user control, fundamentally, is a class. A class is able to hold a
reference to another instance of the same class, which is exactly how you
would implement a linked list. However, you would not want to put in a
reference to the same instance of that class, for this would be a circular
reference. This is the first thing to check.
To be honest, I don't know specifically about a user control, because this
is not the design that I would use. A user control is the mechanism by which
you implement the aggregator design pattern. It is very useful if you want
to encapsulate a collection of controls as a stand-alone reusable entity. If
you are attempting to make a single control - a tree-view-style control - a
better design choice would be to create a custom server control.
--
Chris Jackson
Software Engineer
Microsoft MVP - Windows Client
Windows XP Associate Expert
--
More people read the newsgroups than read my email.
Reply to the newsgroup for a faster response.
(Control-G using Outlook Express)
--
"Michael Carr" <mc***@umich.edu> wrote in message
news:eA**************@TK2MSFTNGP09.phx.gbl...
Is it possible for a user control to contain instances of itself? i.e. for
a
TreeView-style control.
When I try it, I get a Parser error: "Circular file references are not
allowed."
Thanks!!
Michael Carr