Most voted "extension-method" questions
11 questions
Sort by count of
-
27
votes4
answers1698
viewsWhy use C#extension methods?
What I get with extension methods I don’t earn with inheritance? Simply using it as the same name is complicated, since it creates more confusion than anything else.
-
19
votes3
answers1592
viewsWhat is System.Linq for?
I asked that question here at SOPT What is the equivalent of PHP’s C array_map#? And I was curious to know what this is about System.Linq. Because when I tried to use the answer code above without…
-
12
votes2
answers381
viewsJava 8 "default method" versus C# "extend method"
Java 8 introduces the concept of "standard method" to allow adding new features to an interface. C# provides "extension methods" that allow "adding" methods(features) to existing types. Taking into…
-
9
votes2
answers717
viewsReceive variable value without passing parameter
I have the following method: private string toCamelCase(string text) { text = string.Format("{0}{1}",text.Substring(0, 1).ToLower(),text.Substring(1)); return text; } To use it I need to call it…
-
3
votes1
answer1312
viewsDefinition of non-generic method?
In public partial class frmAltInfo : Form Error occurs: Extension method must be defined in a non-generic Static class I don’t understand what it can be or how to fix it. Here was the mistake:…
-
2
votes0
answers90
viewsLINQ with Left Outer Join in Manytomany
I searched a lot about LINQ and Extension Methods, but I did not find a solution for this query that I need to do. The fact is that I have the model below (I left only the entities used) and I need…
-
1
votes2
answers100
viewsExtension Methods in . NET does not work
I’m trying to create a Extension Methods for the class string. He’s not showing up. My class with the extension method: namespace MEUPROJETO.Extension { public static class StringExtension { public…
-
1
votes1
answer78
viewsError creating Extension for Datagridview C#?
I’ve used Xtensions for other components and did not give this problem, is giving the error only with the DataGridView. The component finds the extension, and not the error, the error shows only…
-
1
votes1
answer62
viewsHow to force an event to occur from an extension method?
I am creating a C# application and I am using the interface INotifyPropertyChanged thus: public class Test: INotifyPropertyChanged { private int foo; public int Foo { get => foo; set =>…
-
0
votes0
answers62
viewsWhat is it and how can I use extends and Abstract in a public main?
Hi, I’m a beginner in programming and am currently learning in the game development course. The course teacher couldn’t make it clear to me what it is and how to use extends and Abstract, I watched…
-
0
votes2
answers88
viewsHow to use extensive functions in Javascript
In Javascript primitive types have native functions, such as an object of the type Number has a function toString(): (1).toString(); // "1" And an array has a includes(): [1, 3, 4].includes(1); //…
javascript function functional-programming extension-methodasked 6 years, 9 months ago Yago Azedias 1,117