score:1

Accepted answer

your select is returning an ienumerable of char and you need to build a string from them by using string.join like what you did in the stringbuilder:

linkuret.text = string.join("" , playerlist.skip(skip).take(take).select(x => x.name));

score:0

i would rewrite your loop in this way

    int skip = 0;
    while (skip < playerlist.count)
    {

        hyperlink links= new hyperlink();
        players p = playerlist.skip(skip).firstordefault();
        links.text = $"{p.name}" 
        links.navigateurl = $"playerdetails.aspx?id={p.id}"
        page.controls.add(links);
        skip++;
    }

first i have removed the take part from your code and used firstordefault to get always the first element after the skip. finally the players elements is loaded just one time and then i used the properties of the class with more readable code.


Related Query