473,466 Members | 1,377 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

How to make a wrapper for a COLLECTION (repost)

I am having problem to understand how I can wrap collections in
System.Collections.Generic. For example I want to wrap a
System.Collections.Generic.Dictionary. I wish the wrapping class
to have a constructor similar to that of the dictionary
(besides some possible other argument).

I hink it should be semple but I cannot see the right syntax to
implement
this idea. Could anyone suggest how ?
Intuitively I want something "like":

'------------------------------------
Class DictionaryWrapper

Public Whatever As WhateverObject

Public MyDict As System.Collections.Generic.Dictionary(Of
MyObjectType1, MyObjectType2)(MyComparer)

Sub New(ByVal MyObjectType1 as type?, ByVal MyObjectType2 as
type?, ByVal MyComparer as IComparer , ByVal WhateverObj as
WhateverObject )
Me.MyDict = New System.Collections.Generic.Dictionary(Of
MyObjectType1, MyObjectType2)(MyComparer)
Me.Whatever = WhateverObj
End Sub
End Class
'------------------------------------
Thank you very much
-Pam

Feb 7 '07 #1
0 798

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

Similar topics

15
by: Steve Richfield | last post by:
To All, First, some of your replies to me have been posted through DevelopersDex, and these are NOT posted on USENET for the world to see. DevelopersDex appears to be trying to hijack USENET,...
3
by: Adam | last post by:
I've posted about this previously, but failed to receive a satisfactory response, so have included a code sample: I am trying to receive messages from an HTML viewer control in compact.net (c#),...
6
by: Frank Rizzo | last post by:
ArrayList suffers from the same effect as the vb6 collection object. Once you add an object to the collection, you lose the intellisense for that object. Has anyone seen any wrappers for the...
2
by: vidalsasoon | last post by:
I'm using a DLL that is a managed wrapper of a C++ dll. I have the source code to this wrapper. I think I found a bug so I want to snoop around the c++ code to see what is happening. In the...
2
by: SpotNet | last post by:
Hello Newsgroup, Started a job where an Access 2003 database is accessed with a custom assembly that wraps\encapsulates the relevant System.Data.OleDb classes needed for the application. Briefly...
14
by: Steve McLellan | last post by:
Hi, Sorry to repost, but this is becoming aggravating, and causing me a lot of wasted time. I've got a reasonably large mixed C++ project, and after a number of builds (but not a constant...
7
by: Ashish | last post by:
hi All, I want to create a readonly wrapper for my strongly typed collection, so that when i expose it from my containing object as readonly, other objects are not able to modify it much like...
7
by: Justin Koivisto | last post by:
system: php 4.4.2 windows 2003 server apache 1.3.x problem: scripts don't work :-P description:
2
by: Raj | last post by:
Hi, I have the following problem. I am displaying and printing a PDF file that is generated by my Application server. The print dialogs comes up correctly for the small PDF for the larger PDFs...
5
by: pamela fluente | last post by:
I have been posting this question with no success. I do not know if I am not being clear of the question is too difficult :-)) or unclear. It seems to me that the need to wrap a collection is quite...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
1
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...
0
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...
0
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,...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
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 ...

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.