System.ComponentModel.IComponent and System.ComponentModel.Component

M

ME

I am trying to understand why System.ComponentModel.Component does not
implement System.ComponentModel.IComponent in the .NET Compact Framework
(1.0sp3) according to the documentation of System.ComponentModel.Component
it reads as follows:

Component is the base class for all components in the common language
runtime which marshal by reference. Component is remotable and derives from
MarshalByRefObject. Component provides an implementation of IComponent. The
MarshalByValueComponent provides an implementation of IComponent which
marshals by value.


Yet when looking at System.ComponentModel.Component in the object browser it
does NOT appear to implement IComponent at all (or ANY interfaces for that
matter). In fact if I derrive a class from Component and also add
IComponent as an interface it must implement I get a compilation error
because Component does NOT implmenet IComponent! Even in the object browser
it is stated that it should implement IComponent.

Is there something wrong with my installation of Compact Framework? What is
the point of using Component if it does not implement IComponent? Is this a
known bug with the CF 1.0sp3?

Thanks,

Matt

The code below causes a compilation error:

"C:\Source\dotNET\Generic
Projects\SmartDeviceApplication8\Component1.cs(11):
'SmartDeviceApplication8.Component1' does not implement interface member
'System.ComponentModel.IComponent.Site'"

&

"C:\Source\dotNET\Generic
Projects\SmartDeviceApplication8\Component1.cs(11):
'SmartDeviceApplication8.Component1' does not implement interface member
'System.IDisposable.Dispose()'"



using System;
using System.ComponentModel;
using System.Collections;
using System.Diagnostics;
namespace SmartDeviceApplication8
{
/// <summary>
/// Summary description for Component1.
/// </summary>
public class Component1 : System.ComponentModel.Component, IComponent
{
public Component1()
{
/// <summary>
/// Required for Windows.Forms Class Composition Designer support
/// </summary>
InitializeComponent();
//
// TODO: Add any constructor code after InitializeComponent call
//
}
#region Component Designer generated code
/// <summary>
/// Required method for Designer support - do not modify
/// the contents of this method with the code editor.
/// </summary>
private void InitializeComponent()
{
}
#endregion
}
}
 
I

Ilya Tumanov [MS]

Yes, it's bug corrected in NETCF V2. It won't be corrected in V1 as we can't
change inheritance hierarchy.


Best regards,

Ilya

This posting is provided "AS IS" with no warranties, and confers no rights.

*** Want to find answers instantly? Here's how... ***

1. Go to
http://groups-beta.google.com/group/microsoft.public.dotnet.framework.compactframework?hl=en
2. Type your question in the text box near "Search this group" button.
3. Hit "Search this group" button.
4. Read answer(s).
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top