Return all enumerables with yield return at once; without looping through
I have the following function to get validation errors for a card. My question relates to dealing with GetErrors. Both methods have the … Read more
I have the following function to get validation errors for a card. My question relates to dealing with GetErrors. Both methods have the … Read more
I have a method that returns an IEnumerable<KeyValuePair<string, ArrayList>>, but some of the callers require the result of the method to be a … Read more
I have two instances of IEnumerable<T> (with the same T). I want a new instance of IEnumerable<T> which is the concatenation of both. … Read more
I know it’s possible to cast a list of items from one type to another (given that your object has a public static … Read more
Closed. This question needs to be more focused. It is not currently accepting answers. Want to improve this question? Update the question so … Read more
This question already has answers here: Casting IEnumerable<T> to List<T> (6 answers) Closed 5 years ago. I want to convert from IEnumerable<Contact> to … Read more
I have an IEnumerable<T> method that I’m using to find controls in a WebForms page. The method is recursive and I’m having some … Read more
private IEnumerable<string> Tables { get { yield return “Foo”; yield return “Bar”; } } Let’s say I want iterate on those and write … Read more
Given the following code and the suggestions given in this question, I’ve decided to modify this original method and ask if there are … Read more
Is there a common way to pass a single item of type T to a method which expects an IEnumerable<T> parameter? Language is … Read more