Extension methods Interoperability between languages

Extension methods written in C# can be imported and called with Extension method semantics in VB and vice versa. This is possible since me decorate the assemblies , types and methods in the same manner. Using the Attribute [AttributeUsage(AttributeTargets.Method | AttributeTargets.Class | AttributeTargets.Assembly)] public sealed class ExtensionAttribute : Attribute { } This should be a special note…

4

Conversion rules for Instance parameters and their impact

Overview: Instance parameter is the first parameter of an extension method and has the “this” parameter modifier. I discuss special conversion rules for them and some of the things that users of extension methods might encounter. Consider the code bellow using System;using System.Linq;namespace TestExtensions{    class Program    {        static void Main()        {            0.Foo();    // 1            0f.Foo();           …

2