This week we continue to look at the C++ that IL2CPP outputs for C# to get a better understanding of what our C# is really doing. Today we’ll look at how abstract methods work, whether casting of sealed classes is faster than non-sealed classes, and what happens when creating a delegate.
Posts Tagged delegates
How fast are C# delegates and events? The best answer is “compared to what?”. You probably use callbacks all the time, but what’s the fastest kind of callback? C# delegates and events are nice, built-in features of C#, but you could also implement your own callback interface. Would that gain you any speed? Read on for the performance test and results!
Continuing once again, today we cover an exciting new topic: generics! Have you ever wished your classes could be parameterized with a type like
Vector.<Type> is? With C# generics, you can! Even better, you can parameterize your interfaces, methods, and delegates too. Read on to learn how.
Last week’s article continued the discussion of special types of functions in C#’s class system, including variable numbers of arguments (“var args”), indexers, and conversion operators. Today’s article should finish up the topic of special functions. Read on to learn about the built-in support for delegates, events, and object initializers!