Hello I am new to programming and I came across this problem. I created some class and want it to have these data types.
public struct Test
{
public int ID;
public string x ;
public string y;
public string z ;
}
My problem is because I need to enter a lot of data in that struct and I don't know is there any faster and better method of doing this besides this one. Can someone tell me better solution for this with using struct or without it.
Test example;
example.ID = 1;
example.x = "Something ";
example.y = "Something ";
example.z = "Something ";
I thought about creating list with that structure like this but I don't know how to work with this type of data and how to manipulate it.
List<Test> test1 = new List<Test>();
is there any faster and better method of doing this- doing what? Which "method" you've use now and why you think it's slower/worse?Can someone tell me better solution- I suppose not, because you actually didn't ask what you want/trying to do. E.g. you said "I have a bag, i put there a book, but is there faster/better way to manipulate over the book". How you imagine your manipulation?"Something "strings important? If not, I would suggest to edit the question and remove the whitespace, because it might distract people from your main problem (which is still unclear to me).