Hi,

Consider the following :

List MyList = new List() {null, 2};

Database database =
            (Database)MyList.Where(o => o.GetType().FullName ==
"Comp.Database").FirstOrDefault();

Since the first element is null, this will raise an exception. How can
I change the above to handle that directly in the Linq query ?

Thanks

Reply via email to