|
by: Steve M |
last post by:
I have subclassed CollectionBase. I have also implemented GetEnumerator().
I have tried to set the DataSource of a DataGrid to an instance of my
subclass. However, the items in the grid are not obtained via the Enumerator
that I create in the GetEnumerator() method.
I have tried elplicitly implementing IEnumerable on my sublass as well.
Can anyone help on this? Thanks in advance.
|
by: m. pollack |
last post by:
Hi all,
I've been using the CollectionBase class to implement a
strongly-typed collection, but I have noticed that the
RemoveAt method does not seem to call the "On" hook
methods (OnRemove, OnRemoveComplete). The Add method works
fine, though! I need these to work -- I am exposing the
collection to the user through a PropertyGrid control, and
the user can add/remove collection elements with the
(apparently undocumented) Object...
|
by: Noah Coad [MVP .NET/C#] |
last post by:
How do you make a member of a class mandatory to override with a _new_
definition? For example, when inheriting from
System.Collections.CollectionBase, you are required to implement certain
methods, such as public void Add(MyClass c).
How can I enforce the same behavior (of requiring to implement a member with
a new return type in an inherited class) in the master class (similar to the
CollectionBase)?
I have a class called...
|
by: Eric Johannsen |
last post by:
I have a simple object that inherits from CollectionBase and overrides the
Count property:
namespace MyTest
{
public class CollTest : System.Collections.CollectionBase
{
public override int Count
{
get { return 0; }
|
by: Scott Reynolds |
last post by:
I am having a problem exposing a class inherited from the collection base
class as a webservice. If I expose the collection on a web page all works
well and I am very happy.
However when I try and expose this via a web service I get a weird error
saying that the dll could not be found. The specific error is:
I can't figure it out. I thought it was to do with reflection but I am able
to load and view the webservice definition which...
|
|
by: Mark Overstreet |
last post by:
I am writing custom collections for my business objects but I need support
for the foreach construct. I also need key support so I am inheriting from
NameObjectCollectionBase. I need to support foreach something like
e.g. foreach (HostSystem hs in myHost.Systems)
Unfortunately the builtin support for foreach only returns the keys of the
collection. Anyone have an sample code on how to accomplish this with each
of my custom...
|
by: Matthew Roberts |
last post by:
Howdy Everyone,
I am having trouble understanding the process of creating a type-safe
collection by inheriting from the CollectionBase class. I have done it
plenty of times, but now that I sit down and look at it, I'm wondering
why it behaves the way it does, and also how to improve its
functionality.
First, understand the basic format of a type-safe collection:
|
by: Kyle Novak |
last post by:
I have a question about strongly typed objects when looping through a
collection based on the CollectionBase object and using a For..Each loop.
I have 2 objects:
-Invoice: Holds all properties related to an invoice
-InvoiceCollection: Inherited from Collectionbase class and holds Invoice
objects
The InvoiceCollection class is as follows:
|
by: jc |
last post by:
RE: Two Classes with the same Data Structure.. saving code? Inheriting
a structure?
I have two classes. One in Inherits System.Collections.CollectionBase,
the other does not, but they both have the identical structure and
properties. the only difference between them is there methods and that
one is a collection class and the other is not.
currently the code starts like this:
|
by: Tony Johansson |
last post by:
Hello!
Sorry for opening up this task again.
I want to fully understand this List that is return from CollectionBase.
According to you is List in CollectionBase implemented something like the
below which you sent me previously. So the referenced type for List that
will be
returned at execution time must be CollectionBase. The compile type for List
|
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, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look !
Part I. Meaning of...
|
|
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it.
First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
|
by: Oralloy |
last post by:
Hello folks,
I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>".
The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed.
This is as boiled down as I can make it.
Here is my compilation command:
g++-12 -std=c++20 -Wnarrowing bit_field.cpp
Here is the code in...
|
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth.
The Art of Business Website Design
Your website is...
|
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
|
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules.
He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms.
Adolph will...
|
by: TSSRALBI |
last post by:
Hello
I'm a network technician in training and I need your help.
I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs.
The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols.
I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
|
|
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
|
by: bsmnconsultancy |
last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...
|