Top "Extension-methods" questions

An extension method is a language feature of some languages, such as Swift, Visual Basic.

Enumeration extension methods

In vs2008, is it possible to write an extension methods which would apply to any enumeration. I know you can …

.net enums extension-methods enumeration
Error when using extension methods in C#

I came across an issue that makes me think there is bug in the 3.0 framework. When I try to use …

c# .net-3.5 extension-methods
How to compare nullable types?

I have a few places where I need to compare 2 (nullable) values, to see if they're the same. I think …

c# extension-methods nullable
.NET List<T> Concat vs AddRange

What is the difference between the AddRange and Concat functions on a generic List? Is one recommended over the other?

.net linq list extension-methods
What Advantages of Extension Methods have you found?

A "non-believer" of C# was asking me what the purpose to extension methods was. I explained that you could then …

c# extension-methods
Extension method for List<T> AddToFront(T object) how to?

I want to write an extension method for the List class that takes an object and adds it to the …

c# list extension-methods
How do I write an extension method in JavaScript?

I need to write a few extension methods in JS. I know just how to do this in C#. Example: …

javascript extension-methods
Define an Extension Method for IEnumerable<T> which returns IEnumerable<T>?

How do I define an Extension Method for IEnumerable<T> which returns IEnumerable<T>? The goal …

c# .net extension-methods
Calculating Count for IEnumerable (Non Generic)

Can anyone help me with a Count extension method for IEnumerable (non generic interface). I know it is not supported …

c# .net linq extension-methods ienumerable
Extension Methods not Recognized

What is necessary to have an extension method honored when it exists in an imported assembly? I built one in …

c# extension-methods