In IEnumerable<T>, the opposite of MoveNext

patrick

Well-known member
Joined
Dec 5, 2021
Messages
302
Programming Experience
1-3
C#:
IEnumerable<T> enumer;

public List( IEnumerable<T> list )
{
    this.enumer = list.GetEnumerator(); //<========*** It is IEnumerable<T> list  Type. ***
}

public bool Read()
{
    return enumer.MoveNext();
}

public bool Front()
{
    return enumer.MoveFront(); //<========**** In IEnumerable<T> list ***, There is the opposite of MoveNext()
}

What is the function that moves to the front in IEnumerable<T> list Type
the opposite of MoveNext() in IEnumerable<T> list Type

q3.png
 
Last edited:
Don't ignore all the information that is already at your fingertips. If you had simply paid attention to Intellisense after typing enumer. then you'd have seen what members it actually has. If you needed more information, you should have clicked the name in the code window and pressed F1 to go straight to the documentation for that type. We can help you with the stuff you can't do for yourself but these are the things that you ALWAYS need to do first. Look first, ask questions later.
 
Don't ignore all the information that is already at your fingertips. If you had simply paid attention to Intellisense after typing enumer. then you'd have seen what members it actually has. If you needed more information, you should have clicked the name in the code window and pressed F1 to go straight to the documentation for that type. We can help you with the stuff you can't do for yourself but these are the things that you ALWAYS need to do first. Look first, ask questions later.

I dont konw
 
@patrick : We have told you multiple times that you should really try reading the documentation...

Before opening the spoiler below. Do the following:
1. Click on this link:
.NET API Browser
2. Add that link to your favorites.
3. Type in IEnumerator<T> into the search box of the link from step 1 above.

Here's a link to the IEnumerator<T> documentation:

You can follow the link from there to the IEnumerator documentation:

From there you can discover the other methods. One of the methods there is the one that you seek.

Alternatively, if you read the remarks under the initial IEnumerator documentation and it will also clue you into the method that you are looking for.

Anyway, I highly doubt that the code you have in your post #1 even compiles. You cannot assign an IEnumerator to an IEnumerable. That might be part of the problem that is self-induced.
 
I dont konw
You don't know what? I didn't ask you a question. Are you saying that you don't know how to pay attention to Intellisense or how to press the F1 key?
 
Back
Top Bottom