Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / .NET Framework / New Users / September 2006

Tip: Looking for answers? Try searching our database.

Interface Question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tao - 05 Sep 2006 18:44 GMT
hi, I need help on interface.

I want something like interface, any class implements this interfaces HAS to
do implement method / property declared in this interface.

As there already many functions, I do not want to rewrite all of them. Can I
somehow declare a method which does not care about fucntion parameter list?
Any parameter list is fine for it, it only restrict the return type.

I am not sure if that is possbile.

thanks.

Here is an smaple:

 Class A { pubic int F(int a) {... } }
 Class B { public int F(string s, a) {.. } }

I want a interface like

 interface IA { int F(..); }

so that
 Class A : IA
 Class B : IB

won't complain.

Thanks again.
Alex Turmer - 06 Sep 2006 20:12 GMT
> hi, I need help on interface.
>
[quoted text clipped - 25 lines]
>
> Thanks again.
I suspect that the solution to your problem lies in finding a different
pattern to the one you are suggesting.  It is not clear from you email
what you are trying to achieve over all.  However, if one of my team was
to come to me with this question, I would ask why they want to make this
construct and then try and find a more stable way of solving their
overall problem.

AJ

Signature

www.deployview.com
www.nerds-central.com
www.project-network.com

Tao - 13 Sep 2006 16:23 GMT
I think you are right and I have changed the structure.

thanks.

> > hi, I need help on interface.
> >
[quoted text clipped - 33 lines]
>
> AJ

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.