473,800 Members | 2,518 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Nested Collections

I am trying to set up a nested collection so I can run statements like this

me.lblquestions .text = mysteps.item(1) .questions(1).A sked

Any ideas on how to do this? I have created a Class(Steps) with a nested
Class(Questions ) inside of it and a Collection of that Class(Steps) and it
works fine, but the Nested Collection(Ques tions) is escaping me.

Help!

Nov 20 '05 #1
3 1763
Exactly which part is escaping you? Are you asking how to reference the
Questions collection within the Step object? Or do you need to know how to
create the Questions collection within each Step object?

Jerry
"Atley" <at*****@hotmai l.com> wrote in message
news:Oj******** *****@TK2MSFTNG P11.phx.gbl...
I am trying to set up a nested collection so I can run statements like this
me.lblquestions .text = mysteps.item(1) .questions(1).A sked

Any ideas on how to do this? I have created a Class(Steps) with a nested
Class(Questions ) inside of it and a Collection of that Class(Steps) and it
works fine, but the Nested Collection(Ques tions) is escaping me.

Help!

Nov 20 '05 #2
On Thu, 26 Feb 2004 12:38:57 -0500, "Atley" <at*****@hotmai l.com>
wrote:
I am trying to set up a nested collection so I can run statements like this

me.lblquestion s.text = mysteps.item(1) .questions(1).A sked

Any ideas on how to do this? I have created a Class(Steps) with a nested
Class(Question s) inside of it and a Collection of that Class(Steps) and it
works fine, but the Nested Collection(Ques tions) is escaping me.

Help!

Implement the following classes:

Step
StepCollection inherits CollectionBase
Question
QuestionCollect ion inherits CollectionBase

Add an instance of QuestionCollect ion to the Step class, and you'll
have the desired effect - not "nested classes", by the way, it's
called "strong-typing". Good modelling.

Rgds,

Nov 20 '05 #3
I am trying to figure out how to Create and utilize the QuestionsColl within
each Step Object in the Step Collection

"Jerry Camel" <rl*****@msn.co m> wrote in message
news:e%******** ********@TK2MSF TNGP10.phx.gbl. ..
Exactly which part is escaping you? Are you asking how to reference the
Questions collection within the Step object? Or do you need to know how to create the Questions collection within each Step object?

Jerry
"Atley" <at*****@hotmai l.com> wrote in message
news:Oj******** *****@TK2MSFTNG P11.phx.gbl...
I am trying to set up a nested collection so I can run statements like

this

me.lblquestions .text = mysteps.item(1) .questions(1).A sked

Any ideas on how to do this? I have created a Class(Steps) with a nested Class(Questions ) inside of it and a Collection of that Class(Steps) and it works fine, but the Nested Collection(Ques tions) is escaping me.

Help!


Nov 20 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

6
559
by: B0nj | last post by:
I've got a class in which I want to implement a property that operates like an indexer, for the various colors associated with the class. For instance, I want to be able to do 'set' operations like MyClass.MyColors = Color.Green or, a 'get', such as Color forecolor = MyClass.MyColors; I want to use an indexer so I can take parameters, such as the color type (e.g. "Foreground", "Background" etc.). With a single member function I couldn't...
0
923
by: Prakash C via .NET 247 | last post by:
Hi, I am having a problem to create nested collections. I want tocreate a menu for my site. I created a MenuItem class which willstore the text that should appear on hyperlink. It may alsocontain other properties. Then a MenuItems class which inheritscollection base and implements ienumerator. The MenuItems classholds a collection of MenuItem objects. Ok. Fine. Now, I will be having a nested menu, like Products ->Division -> Category ->...
2
1502
by: Prakash C via .NET 247 | last post by:
Hi, I am having a problem to create nested collections. I want tocreate a menu for my site. I created a MenuItem class which willstore the text that should appear on hyperlink. It may alsocontain other properties. Then a MenuItems class which inheritscollection base and implements ienumerator. The MenuItems classholds a collection of MenuItem objects. Ok. Fine. Now, I will be having a nested menu, like Products ->Division -> Category ->...
5
1338
by: Atley | last post by:
I am trying to set up a nested collection so I can run statements like this: me.lblquestions.text = mysteps.item(1).questions(1).Asked Any ideas on how to do this? I have created a Class(Steps) with a nested Class(Questions) inside of it and a Collection of that Class(Steps) and it works fine, but the Nested Collection(Questions) is escaping me. Help!
1
1937
by: Raju Joseph | last post by:
Hi All, We are in the process of developing an N-Tier app using VB.NET. We are extensively using classes (entity objects) in our design. Further, most of the times, we do have to specify nested types within our entity classes. For example Public Class Country ID as short
77
5253
by: Peter Olcott | last post by:
http://www.tommti-systems.de/go.html?http://www.tommti-systems.de/main-Dateien/reviews/languages/benchmarks.html The above link shows that C# is 450% slower on something as simple as a nested loop. Is this because .NET is inherently slower or does the C# compiler merely produce code that is not as well optimized as the C++ compiler?
1
2253
by: Rick Luckwell | last post by:
I have 3 collections(reports, services, charts) of objects(report, service, chart) that are nested with each other. When I serialize the object the output only contains reports and services but not the charts. Am I missing something? can you serialize to this depth without extra code? or do I need to call the serialize method of the child objects? clsReports.SerializeObject("c:\report.xml", m_AllReports) '"m_AllReports" contains the...
1
3343
by: Morten Fagermoen | last post by:
Hi! I have the function below that return all users in a group, but this code does not work if there are nested groups. Can anyone tell me what to change to also get the users in the nested groups? Sub GetGroupMembers(ByVal ggmGroup As String, ByRef ggmMembers As
5
4191
by: Michi Henning | last post by:
I can pass a generic collection as ICollection<Tjust fine: static void flatCollection(ICollection<intc) {} // ... List<intl = new List<int>(); flatCollection(l); // Works fine Now I want to pass nested collections generically:
2
6289
by: =?Utf-8?B?RGF2aWQgTW9ycmlz?= | last post by:
I am trying to create a nested Dictionary and get an error that seems odd to me. Here is my declaration: private IDictionary<Guid, IDictionary<Guid, string>> myNestedDictionary = new Dictionary<Guid, Dictionary<Guid, string>>(); I get an error unless I nest a Dictionary and not an IDictionary: Error 3 Cannot implicitly convert type
0
9690
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
9550
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10501
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10032
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9085
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5469
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5603
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4149
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
2944
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.