Re: question on anonymous type



Jon Skeet [C# MVP] wrote:
On Jun 5, 3:34 am, Arne Vajhøj <a...@xxxxxxxxxx> wrote:
What is the best ? Which option should I choose ?
The first seems to be more readable ...
I would go for the first as being more readable. Most
C# programmer will be used to reading the type first.

At the moment, yes. I think things will change as C# 3 becomes more
widely known.

I doubt it.

C# 3 will become widely known.

But most C# developers will have learned C# in earlier versions
and many of them will also use other languages from let us call
it "the C syntax family".

And you will not be typing the class name twice. The
IDE should propose it the second time.

True, but it's not really about typing. It's about information
redundancy.

I can not see that redundancy as a big problem. The compiler
will catch it if inconsistent changes are made.

Arne
.



Relevant Pages

  • Re: What is the typeof() an array of a Type?
    ... "Jon Skeet [C# MVP]" wrote: ... Both are very unsatisfactory, of course. ... programmer, author http://www.midnightbeach.com ...
    (microsoft.public.dotnet.framework)
  • Re: Prohibiting an application to run that has been executed before
    ... Scenario: client has new programmer. ... the preferences so desktop icons will launch on a single click. ... See my essay on Avoiding Multiple ... >> MVP Tips site, ...
    (microsoft.public.vc.mfc)
  • Re: Domain name.
    ... > I'm a VB programmer and I noticed that VBLanguage.com was ... > available last week so I grabbed it for resale. ... Seth Rowe ... So you're an MVP and you think there's only one John in the world (and ...
    (microsoft.public.dotnet.languages.vb)
  • Re: Speed of inserting data into a table SqlServerCE
    ... Jon Skeet [C# MVP] wrote: ... >>I have written some proof of concept code that adds records to a table, ... >>utilizing SqlServerCe, using a parameters in a insert statement. ...
    (microsoft.public.dotnet.framework.compactframework)
  • Re: What makes a good C# book?
    ... Jon Skeet [C# MVP] wrote: ... approached wants me to do a bit of market research to find out what people like and don't like in this kind of book. ... introduction books for beginners explaining basic syntax etc. ...
    (microsoft.public.dotnet.languages.csharp)

Loading