• Feeds

    Subscribe in a reader

  • Ads

I wish C# let me do this

public void Foo<T>( T instance )  where T: has DataContractAttribute
{
   ...
}

If only...

#1 Paul Brown on 4.14.2006 at 9:34 PM

Wishing for a little Haskell#, are we?

#2 Steve Maine on 4.14.2006 at 9:47 PM

Actually what I'm really wishing for is #define-syntax-rules, but that would probably be pushing it :)

#3 Haacked on 4.15.2006 at 1:02 AM

Yeah man. Slow down there Steve.Getting all crazy up in here.;)

#4 Yves Reynhout on 5.16.2006 at 1:52 AM

How about a silly marker interface (IDataContract(Enabled))

#5 Steve Maine on 5.16.2006 at 9:38 AM

Yves: yes, that would work. But it kinda defeats the purpose of attributes...