Well, if the method expects an IEnumerable
you’ve got to pass something that is a list, even if it contains one element only.
passing
new[] { item }
as the argument should be enough I think
More Related Contents:
- generic NOT constraint where T : !IEnumerable
- How do I use reflection to call a generic method?
- Passing arguments to C# generic new() of templated type
- The order of elements in Dictionary
- What exactly is an “open generic type” in .NET? [duplicate]
- Generics in C#, using type of a variable as parameter [duplicate]
- Create instance of generic type whose constructor requires a parameter?
- A generic list of anonymous class
- What’s the difference between SortedList and SortedDictionary?
- Why must I provide explicitly generic parameter types While the compiler should infer the type?
- Count the items from a IEnumerable without iterating?
- IEnumerable and Recursion using yield return
- Func with out parameter
- How to check if IEnumerable is null or empty?
- How to compare values of generic types?
- What does “T” mean in C#?
- How to call generic method with a given Type object? [duplicate]
- Convert string to nullable type (int, double, etc…)
- Convert DataTable to generic List?
- When a class is inherited from List, XmlSerializer doesn’t serialize other attributes
- What does denote in C# [duplicate]
- Why does IEnumerable inherit from IEnumerable?
- Can I have a variable number of generic parameters?
- Returning ‘IList’ vs ‘ICollection’ vs ‘Collection’
- Which C# method overload is chosen?
- Why do arrays in .net only implement IEnumerable and not IEnumerable?
- Is it possible to extend arrays in C#?
- How does a generic constraint prevent boxing of a value type with an implicitly implemented interface?
- How to make correct clone of the List? [duplicate]
- Map two lists into a dictionary in C#