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 ...
-
Please read "Asynchronous programming using Async and Await" before reading it. Asynchronous method with multiple await : cl...
-
Stack implementation in C# public class Stack { readonly int _capacity; int top; int[] _stack ; ...
-
Asynchronous programming makes it possible to run multiple operation concurrently, In other words Asynchronously. Dot Net framework 4.0 s...

No comments:
Post a Comment