InfoQ Homepage C# Content on InfoQ
-
C# Feature Focus: Co- and Contra-variance
With .NET 4, C# 4 will be able to support co- and contra-variance in generic interfaces. If you are not familiar with them, think of it as the reason why you can't pass an IEnumerable<Apple> to a function expecting an IEnumerable<Fruit>.
-
C# Feature Focus: Optional and Named Parameters, COM Interoperability
Believe it or not, C# is going to have full support for optional and named parameters. This, and other features intended for COM support, will be included in C# 4. There was also a rumor about parameterized properties.
-
C# Feature Focus: Dynamically Typed Objects, Duck Typing, and Multiple Dispatch
With the increasing importance of dynamic languages and the DLR, C# needs to be able to work with dynamically typed objects. In C# 3 this requires a lot of CLR or DLR reflection code. In C# 4, this will all be handled by the keyword dynamic.
-
.NET 4 Feature Focus: Type Embedding and Equivalence
In .NET 4 types will no longer be restricted to a single assembly. A single type, or part of a type, can be extracted from one assembly and placed into another. Why would you do this? Well first off all, to reduce the cost of including the Office Primary Interopt Assemblies from several megabytes to about 2KB by only including what you actually need.
-
Review: C# Annotated Standard
When you need to know how the C# compiler really works, there is no better place than the C# Standard. But sometimes even that is not enough, especially when you need to know how the Microsoft and Mono compilers differ. This is where Jon Jagger, Perry, Sestoft's Annotated C# Standard comes into play.
-
Interview: Ted Neward on Present and Past Languages
In this interview filmed during QCon London 2008, Ted Neward, author of "Effective Enterprise Java", talks about languages, statical, dynamical, objectual or functional. He dives into Java, C#, C++, Haskell, Scala, VB, and Lisp, to name some of them, comparing the benefits and disadvantages of using one or another.
-
Book Review: C# Network Programming
Normally we review new books, but occasionally an older book is just too good to ignore. Richard Blum's C# Network Programming is one such book. Focusing on low-level network programming, this book is just as applicable today as it was when .NET 1.0 was new. And though titled "C#", this book is applicable to any .NET language.
-
C# Library for Amazon S3 Available on CodePlex
Affirma Consulting has developed a C# library which can be used to access Amazon's S3 services from a .NET application. The library, including examples, has been released on CodePlex.
-
Using Closures to Improve API Design and Usage
Some APIs such as those that perform complex parsing often expose intermediate results via events. As Eric White demonstrates, closures can be used to greatly simplify calling these APIs.
-
SDK for StyleCop Released
One of the central complaints about Microsoft's StyleCop is that the rules were not customizable. This is being addressed with the release of an SDK.
-
Interview: Rustan Leino and Mike Barnett on Spec#
Greg Young sat down with Rustan Leino and Mike Barnett of Microsoft Research to discuss Spec#. Spec# is a superset of C# and allows developers to impose contracts on their own code and verify it. This benefits developers by allowing them to find their own errors sooner saving time and resources.
-
Covariance and Contravariance in .NET Generics
Currently .NET languages such as VB and C# do not support covariance and contravariance for generics. While this is not likely to chance in the near future, people at Microsoft are talking about it.
-
"Squiggles" for C#
With VS 2008 SP 1, C# has finally added error checking comparable to the continuous feedback VB developers have come to expect from their background compiler. Released under the name Live Semantic Errors or "Squiggles", it provides better design time error checking but only for open files.
-
Exploring IronRuby with a C# Perspective
Many developers who know a particular programming language and want to learn a second one, often find it the hardest language to learn but subsequent languages being easier. Any developer who knows C# and has an interest in learning IronRuby can find a tutorial series on learning IronRuby based on knowledge of C# from CodeThinked.
-
Duck Typing Using Runtime Code Generation
Duck typing techniques can be used in statically typed languages like C#, but it generally requires some tedious reflection code. But seeing the benefit of such techniques, some are turning to it anyways and are developing ways to make it less painful.