fæ
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
<3 take care
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
thank you
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
what's the difference between
myDelegate md = myMethod
myDelegate md = myMethod
and
myDelegate md = new myDelegate(md);
myDelegate md = new myDelegate(md);
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
is it necessary to instanciate a delegate type?
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
they are called lambdas?
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
it's only an issue if you do
var write = Console.Write; // ERROR: Multiple overloads, can't choose
var write = Console.Write; // ERROR: Multiple overloads, can't choose
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
can confirm, it does infer it
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
unless it infers it from the <string>?
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
in this case it might be confused as to which WriteLine you're talking about
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
I think you can only do that if the method group has only one overload
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
are both of these "anonymous methods"?
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
vs
Action<string> a = (string s) => { Console.WriteLine(s); };
Action<string> a = (string s) => { Console.WriteLine(s); };
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
Action<string> a = delegate (string s) { Console.WriteLine(s); };
Action<string> a = delegate (string s) { Console.WriteLine(s); };
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
why has no one told me this
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
i can use the delegate keyword to create anonymous methods?
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
but hold on
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
No description
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
I remember trying to make a WPF desktop application when i was younger, i remember doing that for some buttons. little did i know i was using delegates this whole time
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
that is oddly wpf'esque
122 replies
CC#
Created by on 11/21/2024 in #help
When should one use a custom delegate instead of Func/Action/Predicate?
is rx a thing in the C# ecosystem
122 replies