Because Enumerable
is more generic, and a collection represented by enumerable may not have an indexer.
But, if it does – don’t use ElementAt()
it’s probably not going to be as efficient.
More Related Contents:
- c# home works can’t solve [closed]
- Loop not going inside when the value is same [closed]
- ExecuteReader requires an open and available Connection. The connection’s current state is Connecting
- How is Generic Covariance & Contra-variance Implemented in C# 4.0?
- How can I round up the time to the nearest X minutes?
- How do I run a simple bit of code in a new thread?
- Bring a window to the front in WPF
- Send push to Android by C# using FCM (Firebase Cloud Messaging)
- How do I access Configuration in any class in ASP.NET Core?
- Mapping composite keys using EF code first
- yield statement implementation
- c# split string and remove empty string
- Two dimensional array slice in C#
- Unit testing ASP.Net MVC Authorize attribute to verify redirect to login page
- What’s the difference between encapsulating a private member as a property and defining a property without a private member?
- Why use IList or List?
- Difference between == operator and Equals() method in C#?
- Capturing binary output from Process.StandardOutput
- Can I Create a Dictionary of Generic Types?
- SQLite keeps the database locked even after the connection is closed
- Dependency injection resolving by name
- C# HttpWebRequest The underlying connection was closed: An unexpected error occurred on a send
- Irregular shaped Windows Form (C#)
- How do I log ALL exceptions globally for a C# MVC4 WebAPI app?
- How to find child of a GameObject or the script attached to child GameObject via script
- ASCIIEncoding In Windows Phone 7
- Linq – Top value from each group
- Subscribe to INotifyPropertyChanged for nested (child) objects
- How to save the state of a Random generator in C#? [duplicate]
- How do you click a button in a webbrowser control?