tagged [list]
Standard delegates in C#
Standard delegates in C# There are some Delegates predefined in C# I know these: ``` EventHandler // Default event callbacks EventHandler // Default event callbacks with custom parameter (inheriting f...
Adding generic object to generic list in C#
Adding generic object to generic list in C# I have class where the relevant part looks like How should I define the list so that the class compiles? I want a list of type `List>`, that is a list of ob...
How do I check if a given value is a generic list?
How do I check if a given value is a generic list? What's the best way to check if the given object is a list, or can be cast to a list?
- Modified
- 27 Apr at 16:7
How do I get a list of installed updates and hotfixes?
How do I get a list of installed updates and hotfixes? A list of every update and hotfix that has been installed on my computer, coming from either Microsoft Windows Update or from the knowledge base....
returning IList<T> vs Array in C#?
returning IList vs Array in C#? I was recently asking someone why he preferred to return a strongly-typed array over an IList. I had always thought that programming against an interface was the most f...
- Modified
- 2 May at 23:46
What's the best approach to sending email to hundreds of recipients from a Zend Framework application?
What's the best approach to sending email to hundreds of recipients from a Zend Framework application? I'm trying to implement a mailing list system for my application. I'm currently using `Zend_Mail_...
- Modified
- 7 May at 08:13
How to convert object[] to List<string> in one line of C# 3.0?
How to convert object[] to List in one line of C# 3.0? ok I give up, how do you do this in one line? ``` public object Convert(object[] values, Type targetType, object parameter, System.Globalization....
Copying a portion of a list to a new list
Copying a portion of a list to a new list Hey all. Is there a way to copy only a portion of a single (or better yet, a two) dimensional list of strings into a new temporary list of strings?
C# List Comprehensions = Pure Syntactic Sugar?
C# List Comprehensions = Pure Syntactic Sugar? Consider the following C# code: Is this pure syntactic sugar to allow me to write a `for` or `foreach` loop as a one-liner? Are there any compiler optimi...
- Modified
- 5 Jun at 03:50
.NET / C# - Convert List to a SortedList
.NET / C# - Convert List to a SortedList What is the best way to convert a List to SortedList? Any good way to do it without cycling through it? Any clever way to do it with an OrderBy()? Please read ...
- Modified
- 11 Jun at 17:24
Splitting a linked list
Splitting a linked list Why are the split lists always empty in this program? (It is derived from the code on the [Wikipedia](http://en.wikipedia.org/wiki/Linked_List#Language_support) page on Linked ...
- Modified
- 15 Jun at 20:3
LINQ: How to get items from an inner list into one list?
LINQ: How to get items from an inner list into one list? Having the following classes (highly simplified): And having the following data: ``` var parents = new List(); v
How do I move items from a list to another list in C#?
How do I move items from a list to another list in C#? What is the preferable way for transferring some items (not all) from one list to another. What I am doing is the following: In the interest of h...
Performance of Arrays vs. Lists
Performance of Arrays vs. Lists Say you need to have a list/array of integers which you need iterate frequently, and I mean extremely often. The reasons may vary, but say it's in the heart of the inne...
- Modified
- 28 Jun at 08:43
IndexOf too slow on list. Faster solution?
IndexOf too slow on list. Faster solution? I have generic list which must be a preserved order so I can retrieve the index of an object in the list. The problem is IndexOf is way too slow. If I commen...
- Modified
- 2 Jul at 18:50
Is the LinkedList in .NET a circular linked list?
Is the LinkedList in .NET a circular linked list? I need a circular linked list, so I am wondering if `LinkedList` is a circular linked list?
- Modified
- 8 Jul at 04:32
How does one add a LinkedList<T> to a LinkedList<T> in C#?
How does one add a LinkedList to a LinkedList in C#? One would think the simple code would work, however apparently in C#'s LinkedList, First, Last, and their properties are Get only. The other method...
- Modified
- 8 Jul at 04:33
What is the best way to return two lists in C#?
What is the best way to return two lists in C#? I am almost embarrassed to ask this question, but as a long time C programmer I feel that perhaps I am not aware of the best way to do this in C#. I hav...
- Modified
- 8 Jul at 16:33
What C# / Win32 Control Is the Wireless Network Dialog Using?
What C# / Win32 Control Is the Wireless Network Dialog Using? I'm working on an application, and I have a screen that in my mind, looks a lot like the Wireless Network List in Windows Vista. For those...
- Modified
- 12 Jul at 02:13
Shortest way to create a List<T> of a repeated element
Shortest way to create a List of a repeated element With the String class, you can do: What's the shortest way to create a List that is full of `n` elements which are all the same reference?
Double Iteration in List Comprehension
Double Iteration in List Comprehension In Python you can have multiple iterators in a list comprehension, like for some suitable sequences a and b. I'm aware of the nested loop semantics of Python's l...
- Modified
- 29 Jul at 08:30
Convert rows from a data reader into typed results
Convert rows from a data reader into typed results I'm using a third party library which returns a data reader. I would like a simple way and as generic as possible to convert it into a List of object...
- Modified
- 29 Jul at 20:46
C# List<T> vs IEnumerable<T> performance question
C# List vs IEnumerable performance question Hi suppose these 2 methods: ``` private List GetProviderForType(Type type) { List returnValue = new List(); foreach (KeyValuePair provider i...
- Modified
- 31 Jul at 09:17
Multidimensional Lists in C#
Multidimensional Lists in C# At the moment I am using one list to store one part of my data, and it's working perfectly in this format: Now, I would like to add another line to this list, for it to ...
When to use a linked list over an array/array list?
When to use a linked list over an array/array list? I use a lot of lists and arrays but I have yet to come across a scenario in which the array list couldn't be used just as easily as, if not easier t...
- Modified
- 5 Aug at 19:45