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 ...

No comments:
Post a Comment