Re: IDispatch definition in C#



Mattias,

>Why do you need it? Why not simply
> private object m_Server;
Fair enough. In fact, that's what I have been doing to make progress on
this project while I am resolving this. And, if this is Microft's intention
for C# developers, I guess that's what I'll do.

But two things trouble me about this.
First, (I think) it implies that I store all standard COM interface
references in object variables. It seems to me unnecessarily hiding
information about the variable's type. One could extend this logic, I
suppose, and note that I could store integer values in object variables,
which I think we can agree would not be good practice.
Second, since I can store references to .NET interfaces, this (I think)
implies I would develop my class distinguishing between standard COM
interfaces, and typelib-imported + non-COM iterfaces. If I change the
provider of a COM interface service from a COM to a non-COM service, does it
mean I change how I store the reference?

OK, I'm not trying to start a deep philosophy discussion. It just seems
strange that Microsoft would thoughtfully prevent the definition of its core
interfaces from being visible to .NET class designers. I am just trying to
understand its rationale.

Thanks for your help,

Phil Coveney
>
.



Relevant Pages

  • Re: Best way of calling multiple classes?
    ... store all my classes and interfaces in subdirectories. ... The class loader ...
    (comp.lang.php)
  • Re: Open Source Diabetes Management Software Project
    ... Michael Sand wrote: ... saves time and is more accurate than manually entering the numbers. ... With specific interfaces you may even be able to store your additional ...
    (alt.support.diabetes)
  • Re: Writing huge Sets() to disk
    ... pushes it's internal dictionaries ... > Almost anything you do copies references. ... > store the values on disc in a reasonably efficient manner. ... bsddb creaps on me that I can store as a key or value only a string. ...
    (comp.lang.python)
  • Re: Which database design is better
    ... you can update primary keys because you can ... of employee. ... Remember that part in the specs in this thread about each store ... then I can use a REFERENCES clause. ...
    (microsoft.public.sqlserver.programming)
  • Re: object references
    ... > performance reasons) so I don't have to recreated the objects when I need ... > stored in the hashtable has no more references to it? ... You'd need to use WeakReferences - store the WeakReference in the table ...
    (microsoft.public.dotnet.languages.csharp)