Browse by Tags

All Tags » Wacky Ideas » C# 4 (RSS)

Contract classes and nested types within interfaces

I've just been going through some feedback for the draft copy of the second edition of C# in Depth. In the contracts section, I have an example like this: [ContractClass( typeof (ICaseConverterContracts))] public   interface ICaseConverter {...
Posted by skeet | 9 comment(s)
Filed under: , , ,

Faking COM to fool the C# compiler

C# 4 has some great features to make programming against COM components bearable fun and exciting. In particular: PIA linking allows you to embed just the relevant bits of the Primary Interop Assembly into your own assembly, so the PIA isn't actually...
Posted by skeet | 1 comment(s)

C# 4.0: dynamic<T> ?

I've not played with the VS2010 CTP much yet, and I've only looked briefly at the documentation and blogs about the new C# 4.0 dynamic type, but a thought occurred to me: why not have the option of making it generic as a way of saying "I...