Solved

interface return type

Posted on 2008-06-10
4
1,172 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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 30

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

Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

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…
Real-time is more about the business, not the technology. In day-to-day life, to make real-time decisions like buying or investing, business needs the latest information(e.g. Gold Rate/Stock Rate). Unlike traditional days, you need not wait for a fe…
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

726 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