Click here to Skip to main content
16,015,923 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
Hi,

I would like to know what we call the selected value or current value of foreach variable as ?

E.g.

C#
foreach (string fileName in FilesArray)
{
    Console.WriteLine(fileName);
}


Now every time the loop executes, we'll have a value in fileName.
What do we call the value in fileName at a given point of loop execution?
Posted
Updated 3-Jul-13 23:48pm
v2
Comments
jaideepsinh 4-Jul-13 6:03am    
You mean you get value in filesArray every time?
bpc1989 22-Jul-13 2:34am    
Yes.. what is the value called ??
jaideepsinh 22-Jul-13 2:39am    
You still not solved this problem.Because it's long time.
[no name] 4-Jul-13 6:04am    
*IF* I understand your question, and that is a big if, fileName would be an element of the FilesArray.
Sushil Mate 4-Jul-13 6:06am    
your seem more accurate than mine :)

I would call it: "current value of the foreach loop variable".
 
Share this answer
 
It is called the instance
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900