Solved

interface return type

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

Live: Real-Time Solutions, Start Here

Receive instant 1:1 support from technology experts, using our real-time conversation and whiteboard interface. Your first 5 minutes are always free.

Question has a verified solution.

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

Introduction This article series is supposed to shed some light on the use of IDisposable and objects that inherit from it. In essence, a more apt title for this article would be: using (IDisposable) {}. I’m just not sure how many people would ge…
This article describes a simple method to resize a control at runtime.  It includes ready-to-use source code and a complete sample demonstration application.  We'll also talk about C# Extension Methods. Introduction In one of my applications…
This Micro Tutorial will teach you how to censor certain areas of your screen. The example in this video will show a little boy's face being blurred. This will be demonstrated using Adobe Premiere Pro CS6.
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

786 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