我列出了不同类型的数据。我进入了单独的名单。现在我想按顺序推入一个列表。如何实现呢?
For example: list A, (having multiple types of data). i took into
B(used data) = A;
C(unused data) = A;
D(unwanted data) = A;
now i want to show data in table view as sorting order E = C+D+B;
答案 0 :(得分:1)
List E = new List(); //Create list E
// Put whatever you want in the E list like below
E.AddRange(C);
E.AddRange(D);
E.AddRange(B);
Then it will come in rearranged order or sorted order!!
Hope this will helps you!!
答案 1 :(得分:1)
你刚才问的是c#查询。 Xamarin与它无关。你可以做的是,创建一个新列表,并添加你想要的顺序中现有3个列表中的所有数据。您还可以使用AddRange()方法在现有列表中添加整个列表。