ilist Questions

4

Solved

What is the difference between IEnumerable and IEnumerable<T>? I've seen many framework classes implementing both these interfaces, therefore I would like to know what advantages one get by...
Laundress asked 11/2, 2011 at 17:33

5

Solved

Given the the code below: public class Item { private int _id; private int _order; private string _name; public int Id { get { return _id; } set { _id = value; } } public int Orde...
Fantasia asked 7/2, 2013 at 19:27

9

something to mention for answering: Don't worry about variance, while the item in question is Array rather than T[]. A similar case for multi-dimension arrays is [here] That is, N-dims to line...
Knut asked 26/1, 2013 at 2:4

3

Solved

First, I do not consider this question be the dup of these SO questions: Should I always return IEnumerable<T> instead of IList<T>? and IEnumerable<T> as return type As we all k...
Stclair asked 28/1, 2013 at 16:19

2

Solved

I have to realize a serializazion/deserialization class and i'm using System.Xml.Serialization. I have some IList<Decimal> type properties and wanted to serialize in IList<string> decod...
Isidor asked 22/11, 2012 at 13:35

3

Solved

I need to design my own custom GenericCollection class. Now i have plenty of options to derive it using IEnumerable, ICollection, and IList, where later offers some added functionalities. I am lit...
Mook asked 31/10, 2012 at 11:42

2

The IList interface requires an Add method. Arrays implement this function but it simply throws a NotImplementedException. This seems like very bad design to me. What were the designers thinking ...
Oletta asked 8/9, 2009 at 20:17

7

Solved

Must .NET's IList be finite? Suppose I write a class FibonacciList implementing IList<BigInteger> The property Item[n] returns the nth Fibonacci number. The property IsReadOnly returns true...
Lysias asked 11/7, 2012 at 15:14

3

Solved

We're using a class library that performs calculations on 3D measurement data, it exposes a method: MeasurementResults Calculate(IList<IList<Measurement>> data) I would like to allow...
Slone asked 19/4, 2012 at 14:12

3

Solved

I am trying to deserialize some xml into an IList, but I am having problems. This is what I have done so far: The XML: <?xml version="1.0" encoding="utf-8"?> <Animals> <Animal&gt...
Rese asked 14/3, 2012 at 18:30

4

Solved

In a method, I get an object. In some situation, this object can be an IList of "something" (I have no control over this "something"). I am trying to: Identify that this object is an IList (of ...
Chiachiack asked 25/1, 2012 at 9:29

6

Solved

Possible Duplicate: Sorting an IList in C# I have the following method and I need to sort the iList object that is being passed to it (inside this method). I have tried linq but since...
Fleet asked 28/11, 2011 at 18:36

2

Solved

I have a method which builds lists of lists. I'd like to have the return type use the generic IList<> interface to reduce coupling with the concrete List<> type downstream. However, the compi...
Doridoria asked 15/11, 2011 at 20:0

5

Solved

I have this code : IList<string> stelle = stelleString.Split('-'); if (stelle.Contains("3")) stelle.Add("8"); if (stelle.Contains("4")) stelle.Add("6"); but seems that IList have a fix...
Abuttal asked 8/11, 2011 at 14:48

5

Solved

I have a function that takes IList<string> someVariable as a parameter. I want to convert this to a list so I can sort the values alphabetically. How do I achieve this?
Alfy asked 1/9, 2011 at 13:11

5

Solved

Possible Duplicate: Why does (does it really?) List implement all these interfaces, not just IList? Out of curiosity, what is the reason behind generic List<> implementing non-gene...
Ihram asked 27/5, 2011 at 17:58

3

Solved

Please consider the following code: class Student { } enum StudentType { } static void foo(IDictionary<StudentType, IList<Student>> students) { } static void Main(string[] args) { ...
Panay asked 17/5, 2011 at 10:42

2

Solved

I would like to work with ordered enumerables, and use interfaces as return types rather than the concrete types. I need to return an ordered set of objects. But, when using an IList<T> imple...
Aeon asked 25/3, 2011 at 8:12

3

Solved

Is there a lock-free & thread-safe data structure that implements IList? Naturally by lock-free I mean an implementation that makes no use of locking primitives in .NET but rather uses interlo...
Coquito asked 21/2, 2011 at 19:46

4

Solved

Possible Duplicate: count vs length vs size in a collection Really strange: C# arrays such as the following double[] test = new double[1]; support the Length property to get the s...
Singapore asked 22/1, 2011 at 19:13

3

Solved

would this be possible? (I don't have vs. 2010, so I can't try it myself, sorry) public interface IComplexList<out TOutput, in TInput> where TOutput : TInput { public IEnumerator<TOutput...
Alethaalethea asked 11/8, 2009 at 8:44

4

Solved

I have a scenario where a class loads objects of one type, due do abstractions I can not use a generic class (generics tend to spread like cancer :) but I often want to work with a generic version ...
Beading asked 12/11, 2010 at 13:2

3

Solved

I need to allocate very large arrays of simple structs (1 GB RAM). After a few allocations/deallocations the memory becomes fragmented and an OutOfMemory exception is thrown. This is under 32 bit....
Malia asked 3/11, 2010 at 15:3

7

Solved

How to optimize this code? ParentDoglist, ChildDoglistis - Ilist. dogListBox - List Box foreach (Dog ParentDog in ParentDoglist) { foreach (Dog ChildDog in ChildDoglist) { if(ParentDog.StatusI...
Discreditable asked 31/8, 2010 at 11:4

5

Solved

In a specific project at my work, I have a method that returns IList. But this interface does not contain where, or FindAll filters. However, when I open a new project, IList contains all. What is ...
Crews asked 21/7, 2010 at 11:3

© 2022 - 2024 — McMap. All rights reserved.