Possible to assign a data type to an anonymous type's members in a linq query?

Posted by Abe Miessler on Stack Overflow See other posts from Stack Overflow or by Abe Miessler
Published on 2010-05-05T20:45:17Z Indexed on 2010/05/05 20:48 UTC
Read the original article Hit count: 240

Filed under:
|
|

If I have a linq query that creates the anonymous type below:

                    select new
                    {
                        lf.id,
                        lf.name,
                        lf.desc,
                        plf.childId
                    };

Is it possible to assign a specific type to one of the members? Specifically I would like to make lf.id a null-able int rather than an int...

© Stack Overflow or respective owner

Related posts about ASP.NET

Related posts about LINQ