Click here to Skip to main content
15,886,664 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi All,

I have a LINQ result set which holds some value...

i.a.:
C#
var keys= (from p in keyset
           group p.idkey by p.idkey into subcasts
           select subcast).tolist();

Here how can I add a value manually at the last to the "keys"?

Thanks in advance
Posted
Updated 21-Oct-13 6:49am
v2

I'm adding a value 20

keys.Add(20)
 
Share this answer
 
v2
Comments
chinnublr 21-Oct-13 13:11pm    
I am getting an error saying that keys has some invalid arguments.
I am getting an error saying that keys has some invalid arguments.
 
Share this answer
 
Comments
Ranjan.D 21-Oct-13 13:21pm    
You need to add a key of type - subcast
Nelek 21-Oct-13 13:24pm    
Please don't post solutions to chat with people asking or answering. The messages are not always sorted by date, so it can be a bit difficult to follow them correctly.
The best option is to use the "Have a question or comment?" (or the tiny "reply" on another comment). Another advantage is, that the person you write to will get a notification, otherwise it could be that he/she doesn't see your additional question.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900