473,401 Members | 2,139 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,401 software developers and data experts.

nested listst

Hello,

Can anyone help me to get this code up and running ?
It's a task about nested lists, and I don't understand it.

Module Client
Sub Main()
Dim myProcess1 As New Process("process1")
PrintProcessData(myProcess1)

Dim myTask1 As New Task("task1")
myProcess1.AddTask(myTask1)
PrintProcessData(myProcess1)

myProcess1.AddTask(New Task("task2"))
PrintProcessData(myProcess1)

myProcess1.AddTask(New Task("task3"))
PrintProcessData(myProcess1)

Dim myProcess2 As New Process("process2")
myProcess2.AddTasks(New Task() {New Task("task4"), myTask1, New
Task("task5")})
PrintProcessData(myProcess2)

myTask1.Name = "task1b"
PrintProcessData(myProcess1)
PrintProcessData(myProcess2)

myProcess2.AddTasks(myProcess1)
PrintProcessData(myProcess2)

Console.ReadLine()
End Sub
Sub PrintProcessData(ByVal process As Process)
Console.WriteLine("PROCESS: " & process.Name)
Console.WriteLine("INHOUD:")
Console.WriteLine(process.ToString())
Console.WriteLine("AANTAL-ELEMENTEN: " & process.Count())
Dim firstTask As Task = process.FirstTask()
If Not firstTask Is Nothing Then
Console.WriteLine("FIRST-TASK: " & process.FirstTask().Name)
Else
Console.WriteLine("FIRST-TASK: -")
End If
Dim lastTask As Task = process.LastTask()
If Not lastTask Is Nothing Then
Console.WriteLine("LAST-TASK: " & process.LastTask().Name)
Else
Console.WriteLine("LAST-TASK: -")
End If

Console.WriteLine("******************************* *************************************************" )
End Sub
End Module

Jul 21 '05 #1
2 1241
Willy,

A strange question, why do you ask this, do you want to use it for some
reason or did you find it on internet and it does not run?

Cor
Jul 21 '05 #2
Hi Cor,

It's a task for school, but I don't understand it...
I think this shouldn't be a task...

Thanks

Willy

"Cor Ligthert" wrote:
Willy,

A strange question, why do you ask this, do you want to use it for some
reason or did you find it on internet and it does not run?

Cor

Jul 21 '05 #3

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

Similar topics

0
by: Glen | last post by:
I have a Struts action form which contains a bean. I am trying to display a bean retrieved from the database in this form using the nested tag. Can anyone help me? I continue to get an error...
6
by: Andy Baker | last post by:
Hi there, I'm learning Python at the moment and trying to grok the thinking behind it's scoping and nesting rules. I was googling for nested functions and found this Guido quote:...
3
by: Erik Bongers | last post by:
Hi, Nested classes only seem to be able to access static members of the surrounding class : class SurroundingClass { public: class InnerClass { public:
6
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...
8
by: Robert W. | last post by:
I've almost completed building a Model-View-Controller but have run into a snag. When an event is fired on a form control I want to automatically updated the "connnected" property in the Model. ...
3
by: Van den Houten Willy | last post by:
Hello, Can anyone help me to get this code up and running ? It's a task about nested lists, and I don't understand it. Module Client Sub Main() Dim myProcess1 As New Process("process1")...
1
by: Tomas Sieger | last post by:
Hi all, I'm in doubt with the following code: class Base { public: class Nested {}; }; class Derived:public Base { public: class Nested {
77
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....
3
by: jdurancomas | last post by:
Dear all, I'm trying to declare the operator++ to a nested class. The nested class is not template but the container it is. The code used in teh sample program is included bellow: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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,...

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.