❔ What is the difference between public static and public static virtual in a interface?
This is a interface for dynamic plugins loaded from a
AssemblyLoadContext
.
What is the difference between public static virtual
and public static
in a interface? When I use public static virtual
, the method cannot be loaded by reflection.3 Replies
The main application also references
Microsoft.Extensions.DependencyInjection.Abstractions
, is this a problem?Give https://learn.microsoft.com/en-us/dotnet/csharp/whats-new/tutorials/static-virtual-interface-members a read, and let us know if you have more questions 🙂
Explore static virtual members in interfaces
This advanced tutorial demonstrates scenarios for operators and other static members in interfaces.
Was this issue resolved? If so, run
/close
- otherwise I will mark this as stale and this post will be archived until there is new activity.