C# delegates are currently not collected. The are essentially defining a function pointer in C# - need to discuss how to categorize them.
public delegate void LogMessage(string message);
public static void LogToConsole(string text) => Console.WriteLine($"Console: {text}");
public static void LogToFile(string text) => System.IO.File.WriteAllText("log.txt", text);
// Instantiate the delegate by assigning a method group
LogMessage logger = LogToConsole;
// Invoke the method through the delegate variable
logger("Application started.");
// Dynamically change the method target at runtime
logger = LogToFile;
logger("An error occurred.");
C# delegates are currently not collected. The are essentially defining a function pointer in C# - need to discuss how to categorize them.