473,325 Members | 2,805 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,325 software developers and data experts.

Adding hidebysig

How does one declare a method to be "hidebysig"? I am trying to make some
type-specific collections, mirroring
System.Window.Forms.Control.ControlCollection, but I cannot figure out how
to get past the requirements of IList. For instance, if I implement IList,
I must have:
public void Add(Object item)

but I can't figure out how to hide it with
public void Add(Subclass Item)

using ildasm, I see that ControlCollection gets around it by having the
following signature:
public hidebysig newslot virtual

but I can't figure out how to set those middle two.
Jul 21 '05 #1
2 4503
Keith,
Use "Explicit interface member implementation".

Something like:

class MyCollection : IList
{

public void Add(Subclass Item)
{
}

void IList.Add(Object item)
{
}

}

For details see:
http://msdn.microsoft.com/library/de...pec_13_4_1.asp

Hope this helps
Jay

"Keith Patrick" <ri*******************@nospamhotmail.com> wrote in message
news:%2****************@TK2MSFTNGP12.phx.gbl...
How does one declare a method to be "hidebysig"? I am trying to make some
type-specific collections, mirroring
System.Window.Forms.Control.ControlCollection, but I cannot figure out how
to get past the requirements of IList. For instance, if I implement IList, I must have:
public void Add(Object item)

but I can't figure out how to hide it with
public void Add(Subclass Item)

using ildasm, I see that ControlCollection gets around it by having the
following signature:
public hidebysig newslot virtual

but I can't figure out how to set those middle two.

Jul 21 '05 #2
Worked like a charm. Thanks!
Jul 21 '05 #3

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

Similar topics

6
by: Jamie Fryatt | last post by:
Hi everyone, here's what id like to do. I have a table with 2 fields, name and value I need to be able to add multiple records quickly, for example I need to add name value abc 1...
10
by: sp0 | last post by:
Is there a reason why to make mix numbers improper when adding? It seems when subtracting and adding, adding a subtracting the whole numbers and fraction parts should be sufficient? what'ch think
1
by: hzgt9b | last post by:
When adding my VB .NET solution (with two sub-projects) the folder structure in VSS gets an extra level of folders... For example, here's the structure of the solution on my C:\...
3
by: Jim Heavey | last post by:
Trying to figure out the technique which should be used to add rows to a datagrid. I am thinking that I would want an "Add" button on the footer, but I am not quite sure how to do that. Is that...
3
by: Robin Thomas | last post by:
I am fairly new to ASP.NET so I think I am missing something fundamental. Anyway, quite often I am pulling data from a database, but then I need to use that data to produce more data. A simple...
2
by: Keith Patrick | last post by:
How does one declare a method to be "hidebysig"? I am trying to make some type-specific collections, mirroring System.Window.Forms.Control.ControlCollection, but I cannot figure out how to get...
9
by: Kadett | last post by:
Hi all, I have following problem: I'm creating a ListView (Details) control at run-time and filling it with some records (let's say 10 000). This operation seems to be quite fast, but when I call...
0
by: AndyL69 | last post by:
Hello I've got a very strange Problem. When im adding a new ACE entry to a UNC Direcotry the inherented ACL's will be lost. When I'm adding a new ACE to a directory / file in this UNC path the...
9
by: Michael Sander | last post by:
Hello ng, anyone knowns how to add a reference to an assembly to System.Reflection.AssemblyBuilder? In System.Web.Compilation.AssemblyBuilder is a function like AddAssemblyReference, but not in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...

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.