Complex list

mauede

Well-known member
Joined
Sep 1, 2021
Messages
103
Location
Northwood - UK
Programming Experience
Beginner
Dear C# Experts,

I apologize for asking a trivial question. Please, bear with me. I am a beginner with C#.
I have to use Varian ESAPi and Velocity API. Both such libraries are programmable in C# with Visual Studio,
In the following, I am describing my first hurdle in the hope that someone kindly will give me some tips.

There is a need for procedures automation when dealing with Radiotherapy clinical trials. I expected that

Through a script, I will have to allow the user to enter a new name (trial name) and all the corresponding structures list.

That will have to be added to a list of lists. Actually, it is not a list of lists. Every entry is a combination of a <string> and the associated list<string>.

For example:



Trial1 ----> Structure11

----> Structure12

----> Structure13
----> Structure14

----> Structure15

----> Structure16

----> Structure17



Trial2 ----> Structure21

----> Structure22

----> Structure23
----> Structure24



Trial3 ----> Structure31

----> Structure32

----> Structure33
----> Structure34

----> Structure35

----> Structure36

----> Structure37

Trial4 ............



The user will have the possibility to add a new trial with its associated structures sets. Only users with special privileges will have the possibility of editing the structures set associated with a trial or even deleting a whole trial.


How do you advise me to tackle this problem in C#?

I think I watched a webinar presented by Rex Cardan that used a similar construction but I cannot retrieve it right now.

Do you have any suggestions?

Maybe it is a class with two properties, namely a <string> and the associated list<string>.



This is my learning curve…


Thank you so much.

Best regards,

Maura
 

Skydiver

Staff member
Joined
Apr 6, 2019
Messages
5,245
Location
Chesapeake, VA
Programming Experience
10+
Maybe it is a class with two properties, namely a <string> and the associated list<string>.

When writing code, always use the simplest thing that could possibly work first. Then expand on that idea as you start hitting problems. In your case, you are right on target about starting with a class that simply has one string property and a list of strings.
 

Latest posts

Top Bottom