473,659 Members | 2,680 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Implicit interface implemenations

Hi all,

Have a question..

I have an internal interface, and an internal class which implements
the interface.

I've been finding it odd that even though the interface is internal,
when I implictely implement the interface, the method must be marked
public. Not a huge deal, since the class which implements the
interface is internal also.. just find it odd.

Any idea why this is? This is with .Net 2.0.

Thanks
andy

Feb 21 '06 #1
1 1106
aj*****@alum.ri t.edu wrote:
Have a question..

I have an internal interface, and an internal class which implements
the interface.

I've been finding it odd that even though the interface is internal,
when I implictely implement the interface, the method must be marked
public. Not a huge deal, since the class which implements the
interface is internal also.. just find it odd.

Any idea why this is? This is with .Net 2.0.


All members of an interface are implictly public, so must be
implemented with public methods.

Jon

Feb 21 '06 #2

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

Similar topics

86
4118
by: Walter Roberson | last post by:
If realloc() finds it necessary to move the memory block, then does it free() the previously allocated block? The C89 standard has some reference to undefined behaviour if one realloc()'s memory that was freed by realloc(), but the only way explicitly mentioned in the C89 standard to free memory via realloc() is to realloc() it down to 0 bytes. I had always assumed it would automatically free the previous memory, but is the behaviour...
5
4609
by: cody | last post by:
hi! i always hear about the dangers (performance loss) that comes with implicit autoboxing. when are situations where this happens? i only know this happens when i assign a value type to a variable of type object. int i = 1234; object obj = i; // here the implicit conversion takes place
1
1655
by: Bratislav Jevtic | last post by:
hi, Let's suppose I've got 2 classes: MyClass and MyClassColl (coll is inherited from ArrayList, for instance). But, when I invoke GetXXX or something returning object, I receive an object - not instance of MyClass. I've tried with implicit conversions - not working. Is there any way to inherit some collection that will have instances of custom class and make implicit conversion for return values? Practically, I need typed collection....
11
12761
by: Aaron Queenan | last post by:
Given the classes: class Class { public static implicit operator int(Class c) { return 0; } } class Holder
0
1003
by: Aaron Queenan | last post by:
ECMA 334 section 13.4.3 User-defined implicit conversions states that D, the set of types from which user-defined conversion operators will be considered, includes (among other things) the base classes of T (if T is a class). Why are the base classes of T considered at all? Lets say that BT is a base class of T. "BT BT.op_Implicit(X)" is unsuitable for an implicit conversion to T because it returns BT, which can't be implicitly...
59
3168
by: Chris Dunaway | last post by:
The C# 3.0 spec (http://msdn.microsoft.com/vcsharp/future/) contains a feature called "Implicitly typed local variables". The type of the variable is determined at compile time based on the expression to the right of the = sign: var s = "Hello"; //s is strongly typed to be a string var i = 25; //i is strongly typed to be an integer But what I don't understand what advantage it is?
36
3618
by: Chad Z. Hower aka Kudzu | last post by:
I have an implicit conversion set up in an assembly from a Stream to something else. In C#, it works. In VB it does not. Does VB support implicit conversions? And if so any idea why it would work in a C# program but not VB? -- Chad Z. Hower (a.k.a. Kudzu) - http://www.hower.org/Kudzu/ "Programming is an art form that fights back"
10
2196
by: Pieter Breed | last post by:
Hi All, Please excuse me, but the bulk of my post will be a code post. It describes some weirdness with regards to the implicit casting operator. The crux of the problem is this: I want to set a property on a class that takes an interface instance. I have a class that can cast implicit to a class that impliments said interface, but the compiler moans and says it cannot cast implicitly like that.
18
2380
by: Tony | last post by:
class Interface { public: virtual void DoItNow()=0; }; class A: public Interface { public: void DoItNow(); // satisfies interface explicitly
0
8332
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
8851
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
8525
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
8627
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
7356
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5649
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
4175
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
1
2750
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
1737
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.