¡@

Home 

c# Programming Glossary: collections

.NET HashTable Vs Dictionary - Can the Dictionary be as fast?

http://stackoverflow.com/questions/1089132/net-hashtable-vs-dictionary-can-the-dictionary-be-as-fast

the other yes the last one is a bit ambiguous . c# .net collections dictionary hashtable share improve this question System.Collections.Generic.Dictionary..

What's the best way of implementing a thread-safe Dictionary?

http://stackoverflow.com/questions/157933/whats-the-best-way-of-implementing-a-thread-safe-dictionary

a thread safe Dictionary c# .net thread safety collections share improve this question As Peter said you can encapsulate..

How to add a Blend Behavior in a Style Setter

http://stackoverflow.com/questions/1647815/how-to-add-a-blend-behavior-in-a-style-setter

MessageParameter AssociatedObject parameter Finally our collections and attached properties to make this all work. By analogy with..

How would you do a “not in” query with Linq?

http://stackoverflow.com/questions/183791/how-would-you-do-a-not-in-query-with-linq

you do a &ldquo not in&rdquo query with Linq I have 2 collections which have an Email property in both collections. I need to.. I have 2 collections which have an Email property in both collections. I need to get a list of the items in the first list where the..

Is it better to return null or empty collection?

http://stackoverflow.com/questions/1969993/is-it-better-to-return-null-or-empty-collection

for a method that has a collection as a return type c# collections share improve this question Empty collection. Always. This.. property getter. That leaves you with methods that return collections and methods that return enumerables. Its simple to construct.. return InnerGetBars EmptyBarEnumerable When talking about collections you can do the same thing... except you have to make sure your..

Bidirectional 1 to 1 Dictionary in C#

http://stackoverflow.com/questions/268321/bidirectional-1-to-1-dictionary-in-c-sharp

RemoveByFirst T t or RemoveBySecond S s . Thanks c# .net collections share improve this question OK here is my attempt building..

ObservableCollection that also monitors changes on the elements in collection

http://stackoverflow.com/questions/269073/observablecollection-that-also-monitors-changes-on-the-elements-in-collection

are added removed but I was just wondering if any existing collections did this already c# collections share improve this question.. wondering if any existing collections did this already c# collections share improve this question Made a quick implementation myself..

How to modify or delete items from an enumerable collection while iterating through it in C#

http://stackoverflow.com/questions/308466/how-to-modify-or-delete-items-from-an-enumerable-collection-while-iterating-thro

do I have instead of using the rows list I mean . c# collections iteration share improve this question You can remove elements..

In .NET, which loop runs faster, 'for' or 'foreach'?

http://stackoverflow.com/questions/365615/in-net-which-loop-runs-faster-for-or-foreach

loop a long time ago I assumed it stood true for all collections generic collections all arrays etc. I scoured Google and found.. ago I assumed it stood true for all collections generic collections all arrays etc. I scoured Google and found a few articles but..

How do you get the index of the current iteration of a foreach loop?

http://stackoverflow.com/questions/43021/how-do-you-get-the-index-of-the-current-iteration-of-a-foreach-loop

improve this question The foreach is for iterating over collections that implement IEnumerable . It does this by calling GetEnumerator.. of enumeration and cannot be done. Because of that most collections are able to be traversed using an indexer and the for loop construct...

ReadOnlyCollection or IEnumerable for exposing member collections?

http://stackoverflow.com/questions/491375/readonlycollection-or-ienumerable-for-exposing-member-collections

or IEnumerable for exposing member collections Is there any reason to expose an internal collection as a ReadOnlyCollection.. about it or am I missing something Thanks Erik c# .net collections ienumerable readonlycollection share improve this question..

Creating a blocking Queue<T> in .NET?

http://stackoverflow.com/questions/530211/creating-a-blocking-queuet-in-net

_FullEvent.Reset c# .net multithreading collections queue share improve this question That looks very unsafe..

C# - What is the best way to modify a list in a 'foreach' loop?

http://stackoverflow.com/questions/759966/c-sharp-what-is-the-best-way-to-modify-a-list-in-a-foreach-loop

What does the [Flags] Enum Attribute mean in C#?

http://stackoverflow.com/questions/8447/what-does-the-flags-enum-attribute-mean-in-c

a collection of flags rather than a single value. Such collections are usually manipulated using bitwise operators for example..

.NET Collection Naming Convention

http://stackoverflow.com/questions/1126256/net-collection-naming-convention

colleague and I have been having a discussion about what Collections should be called. For example Class Product Collection Class..

MVVM Sync Collections

http://stackoverflow.com/questions/1256793/mvvm-sync-collections

Sync Collections Is there a standardized way to sync a collection of Model objects..

WPF DataGrid: DataGridComboxBox ItemsSource Binding to a Collection of Collections

http://stackoverflow.com/questions/1633800/wpf-datagrid-datagridcomboxbox-itemssource-binding-to-a-collection-of-collectio

DataGridComboxBox ItemsSource Binding to a Collection of Collections Situation I've created a DataGrid in XAML and the ItemsSource.. convert type 'System.Windows.Data.Binding' to 'System.Collections.IEnumerable'. How can the ItemsSource be bound to Data c# wpf..

Enumerating Collections that are not inherently IEnumerable?

http://stackoverflow.com/questions/1815497/enumerating-collections-that-are-not-inherently-ienumerable

Collections that are not inherently IEnumerable When you want to recursively..

C# exposing class to COM - Generic Collections

http://stackoverflow.com/questions/1862497/c-sharp-exposing-class-to-com-generic-collections

exposing class to COM Generic Collections We have a small framework written in C# .Net 2.0 that we want..

Contravariance explained

http://stackoverflow.com/questions/1962629/contravariance-explained

give me feedback Using Variance in Interfaces for Generic Collections Employee employees new Employee 3 You can pass PersonComparer..

XML Serialization and Inherited Types

http://stackoverflow.com/questions/20084/xml-serialization-and-inherited-types

wanted it to be quick to implement in other applications. Collections of Abstract types may be used as well as individual abstract.. AbstractXmlSerializer is this using System using System.Collections.Generic using System.Text using System.Xml.Serialization namespace..

How to name C# source files for generic classes

http://stackoverflow.com/questions/3108189/how-to-name-c-sharp-source-files-for-generic-classes

I have following classes for instance namespace Demo.Bla.Collections folder Collections class Map T in file Map.cs obviously class.. for instance namespace Demo.Bla.Collections folder Collections class Map T in file Map.cs obviously class Bag in file Bag.cs..

Efficient, Immutable, Extensible Collections for .NET [duplicate]

http://stackoverflow.com/questions/3485262/efficient-immutable-extensible-collections-for-net

Immutable Extensible Collections for .NET duplicate This question already has an answer here.. You might want to take a look at the Microsoft.FSharp.Collections namespace in the FSharp.Core assembly. You do not have to program..

What are Generic Collections in C#? [duplicate]

http://stackoverflow.com/questions/361336/what-are-generic-collections-in-c

are Generic Collections in C# duplicate This question already has an answer here .. the declaration looks like List T and I have using System.Collections.Generic at the top of my page. However Visual Studio doesn't..

XmlSerialize a custom collection with an Attribute

http://stackoverflow.com/questions/377486/xmlserialize-a-custom-collection-with-an-attribute

best way around this Here's some sample code using System.Collections.ObjectModel using System.IO using System.Xml.Serialization namespace.. c# .net xml serialization share improve this question Collections generally don't make good places for extra properties. Both..

What does “T” mean in C#? [duplicate]

http://stackoverflow.com/questions/400314/what-does-t-mean-in-c

mean in C# duplicate Duplicate of What are Generic Collections in C# I have a VB background and I'm converting to C# for my..

LINQ Ring: Any() vs Contains() for Huge Collections

http://stackoverflow.com/questions/4445219/linq-ring-any-vs-contains-for-huge-collections

Ring Any vs Contains for Huge Collections Given a huge collection of objects is there a performance difference..

What is the difference between SynchronizedCollection<T> and the other concurrent collections?

http://stackoverflow.com/questions/4655150/what-is-the-difference-between-synchronizedcollectiont-and-the-other-concurren

T and the other concurrent collections in the System.Collections.Concurrent namespace differ from each other apart from Concurrent.. namespace differ from each other apart from Concurrent Collections being a namespace and SynchronizedCollection T being a class.. every access is wrapped in a lock statement. The System.Collections.Concurrent namespace is much newer. It wasn't introduced until..

Operator Overloading with Interface-Based Programming in C#

http://stackoverflow.com/questions/728434/operator-overloading-with-interface-based-programming-in-c-sharp

especially when passing your types to libraries such as Collections . The reason I was concerned about requiring Equals to be used.. especially when passing your types to libraries such as Collections . In my view this is precisely what you should be doing. Equals..

Lambda Expression using Foreach Clause [duplicate]

http://stackoverflow.com/questions/858978/lambda-expression-using-foreach-clause

do with the Deferred Execution's of IEnumerables IQuerable Collections. e.g. var userAgentStrings uasdc.UserAgentStrings .Where UserAgentString..