473,473 Members | 1,745 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Accessibility and Interface

Hi All,

I have some troubles with the implementation of a internal interface

If I define it like below, the method "AMethod" is visible outside the
assembly
namespace Client
{
internal interface IClient
{
void AMethod();
}
public class Class : IClient
{
public void AMethod()
{
}
}
}
If I define it like below, the method "AMethod" is hidden outside the
assembly
namespace Client
{
internal interface IClient
{
void AMethod();
}
public class Class : IClient
{
void IClient.AMethod()
{
}
}
}

But in the two models, I implement the interface of IClient but the result
is different

Anybody can help me to explain the difference

Sincerely,
Polo
Nov 15 '05 #1
1 1704
Hi,

What you implement an interface member using it's fully qualified name,
this is refered to as explicit interface member implementation. Members
implemented are not publically available through an instance of class
that implements the interface member, however if you cast the object to
the interface you can access that member through the interface
reference. In your case this last option will not work because you have
marked the interface internal so you will not be able to do the cast
outside of that assembly.

For further details, see section 13.4.1 of the C# language
specification.

Hope this helps

Chris Taylor
http://www.xanga.com/home.aspx?user=taylorza

*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
Nov 15 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: dnb | last post by:
What follows is a rough outline of what I've been trying to do and thedifficulties I've encountered: I'm trying to make an applet accessible. I've used the Java Accessibility API toprovide an...
52
by: Harlan Messinger | last post by:
Can you help me figure out what to do about popups? Sometimes we develop web applications where popups make very good sense for precisely the same reasons they make sense in traditional...
9
by: Barbara de Zoete | last post by:
I am getting more and more confused as to the meaning of the words 'accessibility' and 'usability' *in the context of the world wide web*. What do these two words mean? How do they differ from one...
4
by: Andy Venikov | last post by:
Hi all, is there a way to make certain functions of a class be accessible only by specific class? Like "friend class whatever", but only for a few functions? This could be usefull in a...
4
by: Steven Quail | last post by:
Hi to all, I am trying to get the hang of using interfaces and for some reason I am getting the "inconsistent accessibility where property ... is less accessible than property ...(cs0052)". ...
1
by: Hans De Schrijver | last post by:
I'm pretty new to C# development, so here's a newby question regarding accessibility: Scenario: class1 contains some basic properies and methods class2 inherits from class1 and adds some...
8
by: Pete Davis | last post by:
First of all, I apologize for cross-posting to so many groups, but clearly there are only 2 people on the planet that understand MS Accessibility in ..NET and I'm hoping I might reach just one of...
4
by: waltborders | last post by:
Hi, Because the blind are unable to use a mouse, keyboard navigation is key. A major difficulty is that not all windows forms controls are keyboard 'tab-able' or 'arrow-able' or have "tab...
0
by: andyalmq | last post by:
I'm trying to utilize the Active Accessibility SDK in order to create a test automation tool. I've been attempting with no success to utilize AccessibleObjectFromWindow using PInvoke in C#. I'm...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.