Solved

interface return type

Posted on 2008-06-10
4
1,169 Views
Last Modified: 2012-06-27
Hi - I am fairly new to c# having a background in c++.

Is it possible to use an interface as a return type for a function ie:
IAsyncResult BeginGetIndustryNews(Object sender, EventArgs e, AsyncCallback cb, object state)

??
0
Comment
Question by:millerthegorilla
4 Comments
 
LVL 18

Accepted Solution

by:
jcoehoorn earned 125 total points
ID: 21755503
You bet.  IAsyncResult is used a lot with delegates and in the System.Threading namespace.  IEnumerable is another common one.
0
 
LVL 14

Expert Comment

by:ajitha75
ID: 21755506
yes
0
 
LVL 29

Expert Comment

by:anarki_jimbel
ID: 21755729
Yes, of course. And easy way to check something like that is to create test method in VS and if compiler does not complain - it's OK :)
0
 

Author Closing Comment

by:millerthegorilla
ID: 31465941
thanks!
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Visual Studio 2013 debugging 2 35
How to LOAD up a .NET Framework website with data? 2 40
LINQ - C# to VB convertion 12 46
ASP.NET 5 Templates 2 66
Article by: Ivo
C# And Nullable Types Since 2.0 C# has Nullable(T) Generic Structure. The idea behind is to allow value type objects to have null values just like reference types have. This concerns scenarios where not all data sources have values (like a databa…
We all know that functional code is the leg that any good program stands on when it comes right down to it, however, if your program lacks a good user interface your product may not have the appeal needed to keep your customers happy. This issue can…
Video by: Mark
This lesson goes over how to construct ordered and unordered lists and how to create hyperlinks.
Learn how to create flexible layouts using relative units in CSS.  New relative units added in CSS3 include vw(viewports width), vh(viewports height), vmin(minimum of viewports height and width), and vmax (maximum of viewports height and width).

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now