TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Sasi Rekha
NA
507
93.8k
Get Value from list of objects
Apr 13 2018 2:11 AM
List<AttributeNamesValues> Keyvalues = new List<AttributeNamesValues>();
AttributeNamesValues keyvalue = new AttributeNamesValues();
keyvalue.AName = "Gross Volume";
keyvalue.AValue = "as100";
Keyvalues.Add(keyvalue);
keyvalue.AName = "Clean Volume";
keyvalue.AValue = "as120";
Keyvalues.Add(keyvalue);
keyvalue.AName = "Clean Volume%";
keyvalue.AValue = "asclean";
Keyvalues.Add(keyvalue);
List<AttributeKeyValues> attributeNames = (from main in db.Attributes_Sub
where attribute_subid.Contains(main.Id)
select new AttributeKeyValues
{
MainName = main.Attributes_Relation.Select(x => x.Attributes_Main.AttributeName).FirstOrDefault().ToString(),
SubName = main.AttributeSubName,
Value= Keyvalues.Where(item => item.AName == main.AttributeSubName).Select(x1=>x1.AValue).FirstOrDefault().ToString()
}).ToList();
I am getting error at while getting Value please help me
Reply
Answers (
2
)
Threading - t.Join() - What does it do exactly?
Need Code for required problem.