I am trying to learn how to use lists in C #. There are many tutorials, but none of them explain how to view the list containing the entry.
Here is my code:
class ObjectProperties { public string ObjectNumber { get; set; } public string ObjectComments { get; set; } public string ObjectAddress { get; set; } } List<ObjectProperties> Properties = new List<ObjectProperties>(); ObjectProperties record = new ObjectProperties { ObjectNumber = txtObjectNumber.Text, ObjectComments = txtComments.Text, ObjectAddress = addressCombined, }; Properties.Add(record);
I want to display the values in the message box. Now I just made sure that the information is on the list. I also want to find out how to find the value in the list and get other information related to it, for example, I want to find the element by the number of the object, and if it is in the list, it will return the address, I also use WPF, if that matters. Any help would be appreciated. Thanks.
Jlott source share