Top "Enumeration" questions

The process of enumerating values, for example from some collection.

IEnumerable<T> as return type

Is there a problem with using IEnumerable<T> as a return type? FxCop complains about returning List<…

c# collections ienumerable enumeration
Why am I getting "Collection was modified; enumeration operation may not execute" when not modifying the enumerated collection?

I have two collections of strings: CollectionA is a StringCollection property of an object stored in the system, while CollectionB …

c# linq enumeration
case class copy 'method' with superclass

I want to do something like this: sealed abstract class Base(val myparam:String) case class Foo(override val myparam:…

class scala inheritance enumeration
How to add a method to Enumeration in Scala?

In Java you could: public enum Enum { ONE { public String method() { return "1"; } }, TWO { public String method() { return "2"; } }, THREE { public String …

java scala enums enumeration
Overriding Scala Enumeration Value

As far as I can tell, Scala has definitions for the Enumeration Value class for Value(Int), Value(String), and …

scala enumeration
Iteration over a sealed trait in Scala?

I just wanted to know if it is possible to iterate over a sealed trait in Scala? If not, why …

scala enumeration scala-macros sealed
What is thread safe (C#) ? (Strings, arrays, ... ?)

I'm quite new to C# so please bear with me. I'm a bit confused with the thread safety. When is …

c# arrays string thread-safety enumeration
How to enumerate CFProperyList / CFDictionary keys

I would like to iterate through a CFDictionary (CFPropertyList) and get all values on a specific level. This would be …

ios macos enumeration core-foundation
Loop through values or registry key.. _winreg Python

How would I loop through all the values of a Windows Registry Key using the Python module _winreg. I have …

python windows registry enumeration winreg
Return Type of Java Generic Methods

I wonder why generic methods which return nothing void are (or can be) declared this way: public static <E&…

java generics methods return-value enumeration