> Now, I think I know what the "strict" is, but WTH is "hidebysig?" 
 
hidebysig is an attribute that tells the CLR how to deal with methods that have 
the same name, in a base and in a derived type. [hidebysig] "hides" all methods 
in the base that match the name and the signature in the derived type. The 
other alternative is to [hidebyname] which hide all methods, regardless of 
signature, in the basetype that have a matching name.
 
C# always uses [hidebysig], but in VB.NET you can choose which one you want by 
using the keywords Overloads (hidebysig), or Shadows (hidebyname) .
 
Not sure if this helps, just my 0.02EUR
 
/daniel

________________________________

Fr�n: Unmoderated discussion of advanced .NET topics. genom Jekke Bladt
Skickat: fr 2004-12-17 23:16
Till: [EMAIL PROTECTED]
�mne: Re: [ADVANCED-DOTNET] Implementing a C# interface in VB.net



Looking a little bit deeper into the question, I noticed some
differences in the MISL code between this method one that works fine:

The method that's causing grief:
.method public hidebysig newslot specialname abstract virtual
        instance class
[GroupOne.Utilities.EventQueues]GroupOne.Utilities.EventQueues.EventMana
ger
        get_QuoteManager() cil managed
{
} // end of method IMarketDataStreamer::get_QuoteManager

An old method that isn't:
.method public newslot specialname abstract strict virtual
        instance class
[GroupOne.CentralClassLibrary.TheKitchenSink]GroupOne.CentralClassLibrar
y.TheKitchenSink.orPortfolio
        get_Portfolio() cil managed
{
} // end of method IHyperfeedPump::get_Portfolio


Now, I think I know what the "strict" is, but WTH is "hidebysig?" Could
it have anything to do with my problem or am I just looking in entirely
the wrong place?

TIA

--Jekke

-----Original Message-----
From: Unmoderated discussion of advanced .NET topics.
[mailto:[EMAIL PROTECTED] On Behalf Of Jekke Bladt
Sent: Friday, December 17, 2004 1:32 PM
To: [EMAIL PROTECTED]
Subject: [ADVANCED-DOTNET] Implementing a C# interface in VB.net


All--

I've got a weird error coming up based on the following interface:

public interface IMarketDataStreamer
{
        void StartStreaming();
        void StopStreaming();
        void TerminateSession();
        EventManager TradeManager { get; }
        EventManager QuoteManager { get; }
        ThreadPriority QuoteThreadPriority { get; set; }
        ThreadPriority TradeThreadPriority { get; set; }
}

When I auto-generate the implementation skeleton in VB.net, I get
something like this (stuff snipped for clarity):

Public Class BogusStreamer
    Implements IMarketDataStreamer

    Public ReadOnly Property QuoteManager() As EventManager Implements
GroupOne.TradingTools.Interfaces.IMarketDataStreamer.QuoteManager
        Get

        End Get
    End Property

    Public ReadOnly Property TradeManager() As EventManager Implements
GroupOne.TradingTools.Interfaces.IMarketDataStreamer.TradeManager
        Get

        End Get
    End Property

End Class

Both of the methods above give me a compiler error along the lines of
"C:\ISEPerforce\GroupOne.CentralClassLibrary\GroupOne.CentralClassLibrar
y.TheKitchenSink\BogusStreamer.vb(34): 'TradeManager' cannot implement
'TradeManager' because there is no matching property on interface
'IMarketDataStreamer'."

I've checked to make sure there are no ambiguous references and get this
message even if I explicitly spell out the type of EventManager in both
signatures and even after I've provided a return value.

What am I doing wrong?

TIA

--Jekke

===================================
This list is hosted by DevelopMentor(r)  http://www.develop.com
Some .NET courses you may be interested in:

Essential .NET: building applications and components with C#
November 29 - December 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at
http://discuss.develop.com

===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

Essential .NET: building applications and components with C#
November 29 - December 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com




===================================
This list is hosted by DevelopMentor�  http://www.develop.com
Some .NET courses you may be interested in:

Essential .NET: building applications and components with C#
November 29 - December 3, in Los Angeles
http://www.develop.com/courses/edotnet

View archives and manage your subscription(s) at http://discuss.develop.com

Reply via email to