Browse by Tags
All Tags »
Microsoft »
.NET4.0 (
RSS)
I would like to thank those that attended my session at TechDays 2010 and I hope that I was able to pass the message of what’s new on C# . For those that didn’t attend (or did and want to review it), the presentation can be downloaded from here . Code...
Dynamic resolution as well as named and optional arguments greatly improve the experience of interoperating with COM APIs such as Office Automation Primary Interop Assemblies (PIAs) . But, in order to alleviate even more COM Interop development, a few...
Filed under: .NET, SoftDev, C#, Events, Microsoft, MSDN, Techdays, .NET4.0, TechDaysPT10, CodeProject, C#4.0
The major feature of C# 4.0 is dynamic programming. Not just dynamic typing, but dynamic in broader sense, which means talking to anything that is not statically typed to be a .NET object. Dynamic Language Runtime The Dynamic Language Runtime ( DLR )...
Filed under: .NET, SoftDev, C#, Events, Microsoft, MSDN, Techdays, .NET4.0, TechDaysPT10, CodeProject, C#4.0
Like I mentioned in my last post , exposing publicly methods with optional arguments is a bad practice (that’s why C# has resisted to having it, until now). You might argument that your method or constructor has to many variants and having ten or more...
As part of the co-evolution effort of C# and Visual Basic , C# 4.0 introduces Named and Optional Arguments . First of all, let’s clarify what are arguments and parameters : Method definition parameters are the input variables of the method. Method call...
Filed under: .NET, SoftDev, C#, Events, Microsoft, MSDN, Techdays, .NET4.0, TechDaysPT10, CodeProject, C#4.0
In my last post , I went through what is variance in .NET 4.0 and C# 4.0 in a rather theoretical way. Now, I’m going to try to make it a bit more down to earth. Given: class Base { } class Derived : Base { } Such that: Trace .Assert( typeof ( Base ).IsClass...
C# 4.0 (and .NET 4.0) introduced covariance and contravariance to generic interfaces and delegates. But what is this variance thing? According to Wikipedia , in multilinear algebra and tensor analysis, covariance and contravariance describe how the quantitative...
Filed under: .NET, SoftDev, C#, Events, Microsoft, MSDN, Techdays, .NET4.0, TechDaysPT10, CodeProject, C#4.0
The first release of C# ( C# 1.0 ) was all about building a new language for managed code that appealed, mostly, to C++ and Java programmers. The second release ( C# 2.0 ) was mostly about adding what wasn’t time to built into the 1.0 release. The main...
Today, my friend Nuno was writing some code to get the PropertyInfo s of a class implementation of an interface. Given this interface: public interface ISomeInterface { int IntProperty { get ; set ; } string StringProperty { get ; } void Method(); } and...
Visual Studio uses Publicize to create accessors public for private members and types of a type. But when you try to set elements of a private array of elements of a private type, things get complicated. Imagine this hypothetic class to test: public static...
Filed under: .NET, C#, Microsoft, MSDN, VisualStudio, Testing, LINQ, VisualStudio2008, VisualStudio2010, TipsAndTricks, .NET2.0, .NET3.5, .NET4.0