Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3443722
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T08:49:34+00:00 2026-05-18T08:49:34+00:00

Under remarks, it says If the type of source implements IList, that implementation is

  • 0

Under remarks, it says

If the type of source implements IList, that implementation is used to obtain the element at the specified index. Otherwise, this method obtains the specified element.

String does not implement IList<T>. Does that mean this will be an O(n) operation if I declare something like,

IEnumerable<char> myString = "stringy";

?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T08:49:34+00:00Added an answer on May 18, 2026 at 8:49 am

    ElementAt when applied to a type which is a string will be an O(N) operation. It does not implement IList<char> and hence ElementAt won’t do any optimizations on it and instead enumerates through the IEnumerable<char> until it reaches the specified index.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Under Windows, I have used a program called Dependency Walker to examine the libraries
Under JBoss 4.0.1SP1, I have a servlet that makes multiple, concurrent calls to web
Under what circumstances would java.util.zip.ZipFile.close() throw an IOException? Its method signature indicates that it
Under Solution->Properties, I can set multiple start-up projects: I know that I can get
under The Thumb instruction set in section 1-34 of ARM11TechnicalRefManual it said that: The
Under the documentation for UIViewController -> nibName property it says: This property contains the
Under certain situations, I need to evict the oldest element in a Java Set
Under VS's external tools settings there is a Use Output Window check box that
Under what circumstances might you want to use multiple indirection (that is, a chain
Under Asynchronous Javascript , the capybara README gives the following example of something that

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.