U
U
Uncle Zhenya2021-10-17 16:15:17
C++ / C#
Uncle Zhenya, 2021-10-17 16:15:17

Where to save a set of parameters for their further sorting?

Greetings! WebDriver Selenium parses many html elements, each of them has about 5 parameters. You need to save each of these elements somewhere so that it would be convenient to sort them later. For example, in the first element, the first parameter contains the number 5, in the second element, the same parameter contains 3. In the future, they need to be sorted in terms of "whichever is larger - that one is displayed, the rest are deleted." The main question is what is the best way to store them? How are class instances? Or in C# there are features specially designed for this purpose.
Visually about the elements:
Element 1:
Parameter 1: Vasya
Parameter 2: 25
Parameter 3: Something else

Element 2:
the same structure as in element 1.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
B
BasiC2k, 2021-10-18
@evgn_tarasevich

You can store data as class members in a List. Sorting a List by class elements is quite possible with linq.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question