KennethBroker
New member
- Joined
- Mar 7, 2016
- Messages
- 1
- Programming Experience
- Beginner
Hello, I am new to C# and I have a quick question.
I made a class that is named LinkInfo.
In the class LinkInfo there are 6 variables
int x1 (coord 1)
int x2 (coord 2)
int y1 (coord 3)
int y2 (coord 4)
Actor (name of an actor)
UseCase (name of a usecase)
This class is made to draw lines between two different x/y coords and get you info about what actor you linked with what usecase.
Now, I want to try and remove an item from a list containing LinkInfo data. private List<LinkInfo> LineList = new List<LinkInfo>();
I want to delete the item that has an Actor-variable containing my own string.
Example:
string X = "Hello"
foreach (LinkInfo ll in LineList)
{
LineList.Remove(ll.Actor = X)
}
I hope you understand what I mean since I am not that familair with all the terms around C#
I made a class that is named LinkInfo.
In the class LinkInfo there are 6 variables
int x1 (coord 1)
int x2 (coord 2)
int y1 (coord 3)
int y2 (coord 4)
Actor (name of an actor)
UseCase (name of a usecase)
This class is made to draw lines between two different x/y coords and get you info about what actor you linked with what usecase.
Now, I want to try and remove an item from a list containing LinkInfo data. private List<LinkInfo> LineList = new List<LinkInfo>();
I want to delete the item that has an Actor-variable containing my own string.
Example:
string X = "Hello"
foreach (LinkInfo ll in LineList)
{
LineList.Remove(ll.Actor = X)
}
I hope you understand what I mean since I am not that familair with all the terms around C#