|
by: Doug Dew |
last post by:
This won't compile:
using IEnumerable<T> = System.Collections.Generic.IEnumerable<T>;
namespace MyNamespace
{
public class MyClass<T> : IEnumerable<T>
{
// Appropriate stuff here
}
|
by: jcc |
last post by:
Hi guys,
I'm a newbie to C#. My Visual Studio 2005 failed to compile the
following code with error as
'HelloWorld.A' does not implement interface member
'System.Collections.IEnumerable.GetEnumerator()'.
'HelloWorld.A.GetEnumerator()' is either static, not public, or has the
wrong return type.
class A : IEnumerable<string>
|
by: Adam Clauss |
last post by:
I am developing an abstract class which implements IEnumerable<T>. I need
the actual implemented methods here to be abstract as well - they will be
implemented by MY subclasses.
However, I cannot seem to get the explicit interface method to accept being
abstract.
Take the following simple class:
abstract class TestEnumerable : IEnumerable<string>
|
by: nick_tucker |
last post by:
Hi,
Could someone tell me which of the following is correct if I want to
make the MyCollection class below enumerable
public class MyCollection:System.Collections.IEnumerable
{
private List<MyItem> m_MyItemsList
System.Collections.IEnumerator
|
by: Gustaf |
last post by:
Using VS 2005. I got an 'IpForm' class and an 'IpFormCollection' class,
containing IpForm objects. To iterate through IpFrom objects with
foreach, the class is implemented as such:
public class IpFormCollection : IEnumerable<IpForm>
{
ArrayList forms = new ArrayList();
public IEnumerator<IpFormGetEnumerator()
{
|
|
by: Paul |
last post by:
Hi,
I feel I'm going around circles on this one and would appreciate some other
points of view.
From a design / encapsulation point of view, what's the best practise for
returning a private List<as a property.
Consider the example below, the class "ListTest" contains a private "List<>"
called "strings" - it also provides a public method to add to that list,
|
by: Andrus |
last post by:
Code below causes error in class definition line
.....Isolator<T>' does not implement interface member
'System.Collections.IEnumerable.GetEnumerator()'.
'Myapp.Isolator<T>.GetEnumerator()' cannot implement
'System.Collections.IEnumerable.GetEnumerator()' because it does not have
the matching return type of 'System.Collections.IEnumerator'.
I tried to change method signature to
|
by: Tony Johansson |
last post by:
Hello!
Below I have a working program.
I have one generic class called Farm<T>
with this header definition public class Farm<T: IEnumerable<Twhere T :
Animal
Now to my question I changed the inheritance of the IEnumerable from the
generic IEnumerable<T>
to the generel IEnumerable and the program function just the same so no
|
by: Anders Borum |
last post by:
Hello
I'm developing an API with a number of concrete collections that inherit
from an abstract collection hierarchy. Each inheritance level provides an
implementation of IEnumerable<T>, thus allowing the developer to take full
advantage of the LINQ extensions without having to start with a cast
operation to a concrete type that matches the collection.
I was surprised that the C# compiler was unable to resolve the type of the
range...
|
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: 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: 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 protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
|
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own....
Now, this would greatly impact the work of software developers. The idea...
|
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: adsilva |
last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
|
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 we have to send another system
|
|
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...
|