What is the purpose of List?

It is possible that this method signature was created as a by-product of some generic class. For example, SwingWorker has two type parameters, one for final result and one for intermediate results. If you just don’t want to use any intermediate results, you pass Void as the type parameter, resulting in some methods returning Void … Read more

What is System.Void?

From the documentation: The Void structure is used in the System.Reflection namespace, but is rarely useful in a typical application. The Void structure has no members other than the ones all types inherit from the Object class. There’s no reason really to use it in code. Also: var nothing = new void(); This doesn’t compile … Read more

How to delete void pointer?

This as written is legal. The cast back to MyCls* is critical. Without that, you will invoke undefined behavior–the MyCls destructor will not be called, and other problems may arise as well (such as a crash). You must cast back to the correct type. Also note that this can be complicated if multiple inheritance is … Read more