We can not declare Async method in interface or it's not needed as Async is code marker for compiler it has no relation with overriding feature. If we want to declare Async methods in Interface we need to set return type of method to Task/Task
C#, WPF, ASP.Net core | Api Versioning |Content Negotiation | Rate limiting |Middleware | Dependency injection | Routing | .Net core | Filters
Thursday, May 9, 2019
C# : How to declare Async method in Interface
We can not declare Async method in interface or it's not needed as Async is code marker for compiler it has no relation with overriding feature. If we want to declare Async methods in Interface we need to set return type of method to Task/Task
Subscribe to:
Post Comments (Atom)
C# Record type: Something to remember while using record types
Record in c# provide a concise and expressive way to create immutable data types, record is a keyword in c#, we can use this keyword with ...
-
We can not declare Async method in interface or it's not needed as Async is code marker for compiler it has no relation with overridi...
-
How To Set Focus on another window (MVVM)? I have two window (Parent-Child). Parent window opens Child window so child window is focuse...
-
Difference between ContentControl and ContentPresenter? ContentPresenter is a lightweight element. It's derived from FrameworkElem...
No comments:
Post a Comment