How can I count the number of elements in IEnumerator?

fasih ullah khan

I am getting all files in a directory by following code.

IEnumerator FILES = Directory.GetFiles(
                DIRECTORY_PATH).GetEnumerator();

How can I get the total number of files? There's no FILES.Count();

Liquid Core
Directory.GetFiles(@"C:\yourdir").Length

will give you count directly

Collected from the Internet

Please contact [email protected] to delete if infringement.

edited at
0

Comments

0 comments
Login to comment

Related

How can I count the number of elements in an array?

How can I count the number of elements that match a predicate with Streams?

How can I count the number of elements with same class?

How can I count number of elements after query?

How can I count the number of elements in my integer array

How can I count the number of

How can I count the number of elements in an XML document using xmlstarlet in BASH?

How can I count the number of matching zero elements between two numpy arrays?

Using a Javascript switch statement, how can I count the number of elements (numbers only) in an array?

How can I receive count of elements?

How can I count elements in a list by type?

How can I count the number of matches for a regex?

How can i count the number of rows duplicated?

How can i count the number coming in excel

How can I count the number of numbers in a string

How can i count the number of errors on Form?

How can I count a number inside a foreach?

How can I count the number of CPU cores?

how can I count a number from a string

How to can I count the number of ones?

How can I count the number of rectangular in column?

How do I count the number of elements in a sortable div?

How do I count the number of marked elements in a CheckedListBox

How can I count the number of instances of continuous number sequences and their frequencies?

How can I get a count of the total number of digits in a number?

How can I count the number of clicks and then send an ajax request with that number?

How can I get a count of the total number of digits in a number in TypeScript?

How can I count the number of one Number in a list

How can i get the number of elements ignoring the subtable elements?