Solved

interface return type

Posted on 2008-06-10
4
1,168 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Extention Methods in C# 3.0 by Ivo Stoykov C# 3.0 offers extension methods. They allow extending existing classes without changing the class's source code or relying on inheritance. These are static methods invoked as instance method. This…
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…
Get a first impression of how PRTG looks and learn how it works.   This video is a short introduction to PRTG, as an initial overview or as a quick start for new PRTG users.
This video gives you a great overview about bandwidth monitoring with SNMP and WMI with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're looking for how to monitor bandwidth using netflow or packet s…

708 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

19 Experts available now in Live!

Get 1:1 Help Now