Top "Func" questions

Func is a family of delegate types in the .Net framework.

Can you get a Func<T> (or similar) from a MethodInfo object?

I realize that, generally speaking, there are performance implications of using reflection. (I myself am not a fan of reflection …

.net performance reflection methodinfo func
Using FluentValidation's WithMessage method with a list of named parameters

I am using FluentValidation and I want to format a message with some of the object's properties value. The problem …

c# .net linq fluentvalidation func
Difference between Func<> with delegate and lambda expression

while deepening myself to more advanced features of C#, I came across some code, which I didn't exactly know the …

c# delegates lambda func
How to declare a generic delegate with an out parameter

Func<a, out b, bool>, just don't compile, how to declare that i want the second parameter be …

c# .net generics func out
Action/Func vs Methods, what's the point?

I know how to use Action and Func in .NET, but every single time I start to, the exact same …

c# .net function action func
Type '()' cannot conform to 'View'; only struct/enum/class types can conform to protocols calling calling functions with swift ui

I have a SwiftUI View called MyWatchView with this stack: VStack (alignment: .center) { HStack { Toggle(isOn: $play) { Text("") } .padding(.trailing, 30.0) .…

swift struct swiftui func watchos
Creating delegates manually vs using Action/Func delegates

Today I was thinking about declaring this: private delegate double ChangeListAction(string param1, int number); but why not use this: …

c# delegates action func
A delegate for a function with variable parameters

I have a function of this sort void func(params object[] parameters) { //Function Body } It can accept parameters of the …

c# delegates func
How to use a Func in an expression with Linq to Entity Framework?

I am trying to write a linq to entity extension method that takes a Func to select a property Id …

c# linq entity-framework expression func
Is it possible to declare generic delegate with no parameters?

I have... Func<string> del2 = new Func<string>(MyMethod); and I really want to do.. Func&…

c# generics delegates func