var list = new List<int> { 3, 1, 0, 5 };
int pos = list.IndexOf(list.Min()); // returns 2
Related Contents:
- How to flatten tree via LINQ?
- When to use Cast() and Oftype() in Linq
- How to get index using LINQ? [duplicate]
- Intersection of multiple lists with IEnumerable.Intersect()
- What guarantees are there on the run-time complexity (Big-O) of LINQ methods?
- Paging with LINQ for objects
- Order of LINQ extension methods does not affect performance?
- Extension methods must be defined in a non-generic static class
- LINQ Aggregate algorithm explained
- Func with out parameter
- Why is .Contains slow? Most efficient way to get multiple entities by primary key?
- How should I inject a DbContext instance into an IHostedService?
- LINQ: Not Any vs All Don’t
- Why does Enumerable.All return true for an empty sequence? [duplicate]
- Should I use two “where” clauses or “&&” in my LINQ query?
- dotnet core System.Text.Json unescape unicode string
- Add client certificate to .NET Core HttpClient
- How to flatten nested objects with linq expression
- LINQ Where Ignore Accentuation and Case
- What does this C# code with an “arrow” mean and how is it called?
- Extension methods syntax vs query syntax
- IEqualityComparer for SequenceEqual
- How to convert linq results to HashSet or HashedSet
- How to select only the records with the highest date in LINQ
- Using Razor outside of MVC in .NET Core
- Why is LINQ .Where(predicate).First() faster than .First(predicate)?
- Is the Linq Count() faster or slower than List.Count or Array.Length?
- How to convert an expression tree to a partial SQL query?
- Enumerating through an object’s properties (string) in C#
- Proper way to start and fire-and-forget asynchronous calls?
- What does this C# code with an “arrow” (=>, an equal sign and greater than sign) mean and how is it called?
- Using Linq Except not Working as I Thought
- What is the Efficiency and Performance of LINQ and Lambda Expression in .Net?
- Operation could destabilize the runtime?
- Linq Query Group By and Selecting First Items
- Net Core: Execute All Dependency Injection in Xunit Test for AppService, Repository, etc
- Can I split an IEnumerable into two by a boolean criteria without two queries?
- Can I LINQ a JSON?
- Custom sort logic in OrderBy using LINQ
- How do I create an expression tree calling IEnumerable.Any(…)?
- How to Get XML Node from XDocument
- Is there a way to make a console application run using only a single file in .NET Core?
- EF Core queries all columns in SQL when mapping to object in Select
- What is the performance of the Last() extension method for List?
- File permissions on Linux/Unix with .NET Core
- Resolving extension methods/LINQ ambiguity
- How do I do a left outer join with Dynamic Linq?
- How to move the cursor or simulate clicks for other applications?
- LINQ performance FAQ
- How does PredicateBuilder work