How to pass output of a linq query to another form in C#
        Posted  
        
            by Ani
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Ani
        
        
        
        Published on 2010-04-23T21:50:42Z
        Indexed on 
            2010/04/23
            21:53 UTC
        
        
        Read the original article
        Hit count: 380
        
I have a Linq query and I want to pass the ouput (userid) to another form for further processing.
var userid = from auser in allusers.Users where auser.Username == nameString select new { id = auser.UserId };
so only 'UserId' is stored in variable 'userid' and I want to use this value in another form. Is there any way we can do this.
Thanks, Ani
© Stack Overflow or respective owner