r3nder
asked on
select last linq and lambda
I have a list that is populated continuously
I need to find the last entry and see if it is one of my strings
Program.myMainControl.dtoc .wordList <- my list
var listofIns = new[]{ "AXGRMS","LATGRMS","AXSHK" ,"LATSHK", "AXROT","L ATROT"}; <- what I am looking for
how do I do that with linq?
I need to find the last entry and see if it is one of my strings
Program.myMainControl.dtoc
var listofIns = new[]{ "AXGRMS","LATGRMS","AXSHK"
how do I do that with linq?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
got it
SVType = Program.myMainControl.dtoc .wordList. Last().the label;
new_SVValue = Program.myMainControl.dtoc .wordList. Last().the value;
SVType = Program.myMainControl.dtoc
new_SVValue = Program.myMainControl.dtoc
ASKER
Thanks when I saw what you wrote I figured it out.....:D
ASKER
var listofIns = new[]{ "AXGRMS","LATGRMS","AXSHK"
are the strings I am looking for in the wordlist.thelabel
the struct is below for the wordlist
public struct datawords
{
public DateTime thetime { get; set; }
public string thelabel { get; set; }
public float thevalue { get; set; }
}
public BindingList<datawords> wordList = new BindingList<datawords>();