0

Can i access from my library to my application that is using it?

public void DoSomething(void MethodName)
{
    MethodName();
}

So i know this is a wrong code but can this solved somehow?

  • Does this answer your question? [C# function pointer?](https://stackoverflow.com/questions/9754669/c-sharp-function-pointer) – Nicholas Hunter Apr 21 '21 at 14:06
  • You can call it directly in your application if it publicly accesses or if it is privet you should respect the encapsulation and call other abstracted function.... maybe Try to look to [Delegates](https://learn.microsoft.com/en-us/dotnet/csharp/programming-guide/delegates/) to know how to pass a function as an argument .... – Ibram Reda Apr 21 '21 at 14:11
  • Yes, you instantiate the object containing this method, then call it... –  Apr 21 '21 at 14:11

0 Answers0