| c# Programming Glossary: seqC# Producer/Consumer pattern http://stackoverflow.com/questions/1371249/c-sharp-producer-consumer-pattern  Producer Queue string queue Object lockObject static int seq 0 public Producer Queue string queue Object lockObject  this.queue.. this.lockObject lockObject public void produce  while seq 15 just testinng 15 items  lock lockObject   string item item.. just testinng 15 items  lock lockObject   string item item seq  queue.Enqueue item  Console.WriteLine Producing 0 item  if.. 
 How to find the longest palindrome in a given string? [duplicate] http://stackoverflow.com/questions/2677000/how-to-find-the-longest-palindrome-in-a-given-string  algorithms. public static int LongestPalindrome string seq  int Longest 0 List int l new List int int i 0 int palLen 0.. new List int int i 0 int palLen 0 int s 0 int e 0 while i seq.Length  if i palLen seq i palLen 1 seq i   palLen 2  i 1  continue.. palLen 0 int s 0 int e 0 while i seq.Length  if i palLen seq i palLen 1 seq i   palLen 2  i 1  continue  l.Add palLen Longest.. 
 How to Zip one IEnumerable with itself http://stackoverflow.com/questions/2768834/how-to-zip-one-ienumerable-with-itself  post describes how to calculate the total distance of a sequence of points taken in order by essentially zipping the sequence.. of points taken in order by essentially zipping the sequence with itself generating the sequence for Zip by offsetting.. zipping the sequence with itself generating the sequence for Zip by offsetting the start position of the original.. 
 Writing the F# recursive folder visitor in C# - seq vs IEnumerable http://stackoverflow.com/questions/308481/writing-the-f-recursive-folder-visitor-in-c-sharp-seq-vs-ienumerable  the F# recursive folder visitor in C# seq vs IEnumerable  I often use this recursive 'visitor' in F# let.. this recursive 'visitor' in F# let rec visitor dir filter seq yield Directory.GetFiles dir filter for subdir in Directory.GetDirectories.. the C# version for the recursion but not in F#... Does the seq implicitly do a 'concat'  c# f#   share improve this question.. 
 From Eric Lippert's blog: “don't close over the loop variable” [duplicate] http://stackoverflow.com/questions/3190578/from-eric-lipperts-blog-dont-close-over-the-loop-variable  T CartesianProduct T this IEnumerable IEnumerable T sequences base case IEnumerable IEnumerable T result new Enumerable.Empty.. IEnumerable T result new Enumerable.Empty T foreach var sequence in sequences var s sequence don't close over the loop variable.. T result new Enumerable.Empty T foreach var sequence in sequences var s sequence don't close over the loop variable recursive.. 
 Find sequence in IEnumerable<T> using Linq http://stackoverflow.com/questions/3561776/find-sequence-in-ienumerablet-using-linq  sequence in IEnumerable T using Linq  What is the most efficient.. T using Linq  What is the most efficient way to find a sequence within a IEnumerable using Linq I want to be able to create..   Here's an implementation of an algorithm that finds a subsequence in a sequence. I called the method IndexOfSequence because.. 
 Reactive Extensions for .NET (Rx): Take action once all events are completed http://stackoverflow.com/questions/3867858/reactive-extensions-for-net-rx-take-action-once-all-events-are-completed  as soon as either event happens. Thanks for your help. var seq Observable.FromEvent EventArgs this.checkBox CheckedChanged.. KeyPressEventArgs this.textBox KeyPress seq.Subscribe unused this.resultTextBox.Text Done  c# .net system.reactive.. 
 What is the effect of AsEnumerable() on a LINQ Entity? http://stackoverflow.com/questions/5311034/what-is-the-effect-of-asenumerable-on-a-linq-entity  out reliable Removing the AsEnumerable results in a Local sequence cannot be used in LINQ to SQL implementations of query.. on new Ocr p.OCR fileName p.PrintFilename equals new Ocr s.seq fileName s.inputFileName  where p.Version null  orderby s.fileOrdering..  where p.Version null  orderby s.fileOrdering s.seq  select new ReportSpoilsEntity    seq s.seq   fileOrdering s.fileOrdering.. 
 f# Method Chaining vs |> Pipe Operator http://stackoverflow.com/questions/7698133/f-method-chaining-vs-pipe-operator  requires that the type of a is already known to be seq _ whereas a Seq.groupBy itself infers a to be seq _ . The following.. to be seq _ whereas a Seq.groupBy itself infers a to be seq _ . The following function let increment items items Seq.map.. annotation to be written using LINQ let increment items seq _ items.Select fun x x 1 As you get comfortable with the functional.. 
 How to take all but the last element in a sequence using LINQ? http://stackoverflow.com/questions/1779129/how-to-take-all-but-the-last-element-in-a-sequence-using-linq   Let's say I have a sequence. IEnumerable int sequence GetSequenceFromExpensiveSource sequence now contains 0 1 2 3 ... 999999..  while hasRemainingItems static void Main string args var Seq Enumerable.Range 1 10 Console.WriteLine string.Join Seq.Select.. Seq Enumerable.Range 1 10 Console.WriteLine string.Join Seq.Select x x.ToString .ToArray Console.WriteLine string.Join Seq.TakeAllButLast.. 
 F# Seq module implemented in C# for IEnumerable? http://stackoverflow.com/questions/410717/f-seq-module-implemented-in-c-sharp-for-ienumerable  Seq module implemented in C# for IEnumerable  F# has a bunch of..   share improve this question   If you look carefully many Seq operations have a LINQ equivalent or can be easily derived... or can be easily derived. Just looking down the list ... Seq.append Concat TSource IEnumerable TSource second Seq.concat.. 
 Should i use ThreadPools or Task Parallel Library for IO-bound operations http://stackoverflow.com/questions/5213695/should-i-use-threadpools-or-task-parallel-library-for-io-bound-operations  and see it on practical data. Test Legend Itr Iteration Seq Sequential Approach. PrlEx Parallel Extensions Parallel.ForEach.. see it on practical data. Test Legend Itr Iteration Seq Sequential Approach. PrlEx Parallel Extensions Parallel.ForEach.. Itr. Seq. PrlEx TPL TPool ________________________________________________________________________________.. 
 |