Because you are explicitly stating that your "o" variable is an object, you have to be explicit in the typing from the If ternary operator. If you want to use type inference, you need to specify the resulting object as part of the instantiation. (IE. Use the syntax Matt gave).
For some more information regarding the new ternary operators, see http://www.thinqlinq.com/Default/IIF(You.Uses=IIF,Stop,Consider.If(cond,true,false)).aspx.
Jim Wooley
www.ThinqLinq.com
http://www.LinqInAction.net - "LINQ In Action", The book is now available. Don't wait for the movie
For some more information regarding the new ternary operators, see http://www.thinqlinq.com/Default/IIF(You.Uses=IIF,Stop,Consider.If(cond,true,false)).aspx.
Jim Wooley
www.ThinqLinq.com
http://www.LinqInAction.net - "LINQ In Action", The book is now available. Don't wait for the movie