• Feeds

    Subscribe in a reader

  • Ads

More on C# language features

I got to talk to AndersH for an extended period of time today. I take back what I said in an earlier post -- the only thing better than hearing the inventor of C# talk about the language is being able to sit down with him and have him answer your questions.

I've always wondered if the following syntax would be supported:

[LessThan( delegate{ return System.DateTime.Now; } )]
System.DateTime.Date MyProperty
{
   get{}
   set{}
}

It's official, folks: it won't be. Sad. But we sure did have a great conversation!

We also talked about the typeof() opertator. I asked him if we'd see a more generic info_of() operator...the word was that they were considering it, but it proably won't show up in Whidbey. Which is too bad, since the generic databinding API in Avalon depends a lot on you passing the string representation of a data-bound property name...I'd really like to be able to find out that I fat-fingered this string at compile time instead of runtime.

#1 Brian Vargas on 10.29.2003 at 8:06 PM

Glad you got to ask about this stuff.Suck about the delegates not being supported.Can you explain why, or is that for an IM conversation?As for the info_of() (a.k.a. nameof()) operator, I hope they put that in.It's such a commonly done thing now, and a runtime error in such a case is just not acceptable.