What if the class is public , but the parameter passed to it must be internal ?
A simple reproducible example:
public abstract class TypeData { // абстрактный класс } public class TypeData<T> : TypeData { // реализация класса } Next, we define the internal type:
internal delegate void SomeDelegate(int a, string b); After that we will try to use it in a public class:
public class TypeDataDelegateContain : TypeData<SomeDelegate> { // реализация дополнительного функционала класса } What we get from this is nothing good except a compilation error:
Availability inconsistency: The availability of the TypeData base class is lower than the availability of the TypeDataDelegateContain class.
Can this be avoided without disclosing an internal delegate?
internal delegate void SomeDelegate(int a, string b);no delegate needed because There is already a ready-to-useAction<int, string>. - Bulson 8:33unsafeas well as partially working with pointers, well, apart from that there is an agreement on calls. - LLENNSomeDelegateclientSomeDelegatecopy ofSomeDelegate? There is a solution - instead of a delegate, get an abstract class with a method and use it already as a generic parameter, well, and then make an internal-inheritor of this class. - Andrei NOP