But Length is always a (valid) property of arrays, whether or not LINQ is reference. Or are you saying that Length "disappears" when LINQ is referenced?
Tristan. On Tue, Feb 15, 2011 at 4:23 PM, Ian Thomas <il.tho...@iinet.net.au> wrote: > Michael – slip of the fingers – yes, it was a .Count method (when LINQ is > referenced), and a .Length property (when not). Not weird, lang c# > > > ------------------------------ > > Ian Thomas > Victoria Park, Western Australia > ------------------------------ > > *From:* ozdotnet-boun...@ozdotnet.com [mailto: > ozdotnet-boun...@ozdotnet.com] *On Behalf Of *Michael Minutillo > *Sent:* Tuesday, February 15, 2011 1:20 PM > *To:* ozDotNet > *Subject:* Re: LINQ extensions > > > > Weird. It should add a .Count() extension method, not a property. Are you > coding in a language that has optional parentheses by any chance? > > On Tue, Feb 15, 2011 at 1:12 PM, Ian Thomas <il.tho...@iinet.net.au> > wrote: > > FYI only > > Just an oddity I hadn’t taken in before, that a reference to LINQ makes > .Count a valid property of arrays (otherwise .Length is valid). > > I had been using LINQ to Objects in a small projects and changed it to not > do so, meticulously cleaned references to LINQ out (VS2008 does not seem to > do that thoroughly), and had a couple of errors arise with myarrays.Count > statements I had been slack enough to write previously. > > Framework 3.5 > ------------------------------ > > Ian Thomas > Victoria Park, Western Australia > > >