© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•3y ago•
29 replies
Uvuv

✅ How to do the C# equivalent of passing an std::function into a class

Hi, so I'm trying to make a class function that can accept a function of type float(float). I don't really understand how C# works because I'm coming from C++, which is very different than C# besides the names of data types. I've heard of delegates, but in all instances of a delegate parameter I've seen it as a pointer. Is a pointer bad C# syntax though in this case, since I'm trying to learn how to write C# well versus writing C# like C++. thanks in advance
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources

Similar Threads

Was this page helpful?
Recent Announcements

Similar Threads

❔ How to input a reference of a class into a function with an argument of an interface
C#CC# / help
4y ago
passing a 3D array of shorts as an argument to a c function from C#
C#CC# / help
2y ago
Why do we enclose the `Main` function inside of a class in C#?
C#CC# / help
2y ago
❔ how to create a class equivalent to another
C#CC# / help
3y ago