none
help extrect line from listbox RRS feed

  • Question

  • hello

    i want extrect line from listbox The biggest time used is this lines

    test.exe :0.12.00.5724686 test.exe :0.52.00.5724686 test.exe :0.33.00.5724686 test.exe :0.24.00.5724686 test.exe :0.57.00.5724686

    i want extrect the line test.exe :0.57.00.5724686 if this line big time used


    Monday, September 16, 2019 9:00 PM

Answers

  • Given the data presented and a wanted response this gives the value, append test.exe : to it

    MessageBox.Show(listBox1.Items.Cast<string>().Select(item => item.Replace("test.exe :", ""))
        .OrderByDescending(item => item).FirstOrDefault());
    


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Monday, September 16, 2019 9:38 PM
    Moderator

All replies

  • Given the data presented and a wanted response this gives the value, append test.exe : to it

    MessageBox.Show(listBox1.Items.Cast<string>().Select(item => item.Replace("test.exe :", ""))
        .OrderByDescending(item => item).FirstOrDefault());
    


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    Monday, September 16, 2019 9:38 PM
    Moderator
  • Given the data presented and a wanted response this gives the value, append test.exe : to it

    MessageBox.Show(listBox1.Items.Cast<string>().Select(item => item.Replace("test.exe :", ""))
        .OrderByDescending(item => item).FirstOrDefault());
    


    Please remember to mark the replies as answers if they help and unmarked them if they provide no help, this will help others who are looking for solutions to the same or similar problem. Contact via my Twitter (Karen Payne) or Facebook (Karen Payne) via my MSDN profile but will not answer coding question on either.

    NuGet BaseConnectionLibrary for database connections.

    StackOverFlow
    profile for Karen Payne on Stack Exchange

    nice nice Thank you very much for your cooperation with me you are a very professional person
    Monday, September 16, 2019 9:59 PM