C
C#2y ago
Hugh

✅ Sharing a Func alias between files

Hi all, I've currently got the following at the top of 2 different files:
using MyFunc = Func<string, string, int, float, string>;
using MyFunc = Func<string, string, int, float, string>;
Because it's a using, as I understand it, it's only available to that one file. How can I do something where I only define this function type in one place, and can use it in multiple files?
2 Replies
sibber
sibber2y ago
define a delegate (or using global, but id define a delegate)
Hugh
HughOP2y ago
Thanks - will go with the delegate using global sounds like something I'd really rather avoid
Want results from more Discord servers?
Add your server