¡@

Home 

c# Programming Glossary: iterators

C# Performance of nested yield in a tree

http://stackoverflow.com/questions/1043050/c-sharp-performance-of-nested-yield-in-a-tree

ideal in terms of performance you end up creating a lot of iterators for large trees instead of a single iterator which knows how.. Some blog entries concerning this Wes Dyer All about iterators Eric Lippert Immutability in C# part 6 Eric again Immutability..

“Nested foreach” vs “lambda/linq query” performance(LINQ-to-Objects)

http://stackoverflow.com/questions/1044236/nested-foreach-vs-lambda-linq-query-performancelinq-to-objects

clause so every eventual item has to pass through three iterators. Obviously the two where clauses could be combined in this case..

What is the purpose/advantage of using yield return iterators in C#?

http://stackoverflow.com/questions/1088442/what-is-the-purpose-advantage-of-using-yield-return-iterators-in-c

is the purpose advantage of using yield return iterators in C# All of the examples I've seen of using yield return x.. what if you were building a collection yourself In general iterators can be used to lazily generate a sequence of objects . For example.. programming concepts . In my opinion if you are looking at iterators just as a way to enumerate through a collection it's just one..

implementing a state machine using the “yield” keyword

http://stackoverflow.com/questions/1194853/implementing-a-state-machine-using-the-yield-keyword

Iterator blocks were created to help you write custom iterators for collections not for solving the general purpose problem..

Performance surprise with “as” and nullable types

http://stackoverflow.com/questions/1583050/performance-surprise-with-as-and-nullable-types

LINQ code which I'd have expected to be slower given the iterators involved beats the as code. Is the .NET implementation of isinst..

What are major differences between C# and Java?

http://stackoverflow.com/questions/295224/what-are-major-differences-between-c-sharp-and-java

doesn't have iterator blocks for simple implemetation of iterators Java doesn't have anything like LINQ Partly due to not having..

Serializing anonymous delegates in C#

http://stackoverflow.com/questions/321827/serializing-anonymous-delegates-in-c-sharp

case based on my research into the similar problem with iterators. Background I am investigating the serialization of anonymous.. 2 This is similar to the issue of trying to serialize iterators and I had found the following code in a previous search see.. dotnet.agilekiwi.com blog 2007 12 update on persistent iterators.html Unfortunately Microsoft have confirmed that they probably..

What are reasons why one would want to use nested classes? [duplicate]

http://stackoverflow.com/questions/3300051/what-are-reasons-why-one-would-want-to-use-nested-classes

People also use nested classes to build things like iterators or comparators things that make no sense outside of the class..

IEnumerable<T> as return type

http://stackoverflow.com/questions/381208/ienumerablet-as-return-type

T No nothing at all. In fact if you are using C# iterators this is the expected behavior. Converting it to a List T or..

Visual Studio Async CTP - How does it work?

http://stackoverflow.com/questions/4047427/visual-studio-async-ctp-how-does-it-work

write a C# version now . The translation is similar to iterators and yield return and in fact it was possible to use iterators.. and yield return and in fact it was possible to use iterators to implement asynchronous programming in C# earlier. I wrote..

Generating Permutations using LINQ

http://stackoverflow.com/questions/4319049/generating-permutations-using-linq

2 2 1 2 2 2 2 2 2 2 Note that the usage of multiply nested iterators for concatenation is not very efficient but who cares You already..

Why should I use foreach instead of for (int i=0; i<length; i++) in loops?

http://stackoverflow.com/questions/4383250/why-should-i-use-foreach-instead-of-for-int-i-0-ilength-i-in-loops

Creating a circually linked list in C#?

http://stackoverflow.com/questions/716256/creating-a-circually-linked-list-in-c

Linked List and a Circular Linked List is the behavior of iterators upon reaching the end or beginning of a list. A very easy way..

Why is LINQ .Where(predicate).First() faster than .First(predicate)?

http://stackoverflow.com/questions/8663897/why-is-linq-wherepredicate-first-faster-than-firstpredicate

iterate through the collection but Where has a variety of iterators specialised for different collection types arrays lists etc...