.Net Framework Interview Questions and Answers
<< Previous Question Next Question >>
 Question: 502 Page Views: 

What is difference between for and foreach?



Posted By: Avi Date: 14 October 2010 01:31:49 AM
 Answer:

Foreach loop iterates through given collection, for loop can iterate until check expression evaluates to false.


Posted By: avibtech


Date: 14 October 2010 01:31:49 AM
Post a better Answer if you have
 
(Will show your Gravatar icon)  
  Country flag

Loading
Enter the text as shown in the image QEfXlt
Related Questions
.Net Framework : How do you overload a method?

How do you overload a method?

By giving new method the same name as existing one and changing the list of parameters (adding, remo....
Category: .Net Framework Date: 10/14/2010 1:41:49 AM
.Net Framework : What is difference between for and foreach?

What is difference between for and foreach?

Foreach loop iterates through given collection, for loop can iterate until check expression evaluat....
Category: .Net Framework Date: 10/14/2010 1:31:49 AM
.Net Framework : What new types comes with .NET framework 4?

What new types comes with .NET framework 4?

BigInteger, Complex
Category: .Net Framework Date: 10/13/2010 11:47:48 PM
.Net Framework : What are stream based XML processing tools?

What are stream based XML processing tools?

XmlWriter, XmlReader
Category: .Net Framework Date: 10/13/2010 10:54:49 PM
.Net Framework : What languages are supported by .Net framework?

What languages are supported by .Net framework?

Languages that meets standards defined in Common Language Specification. For example C#, c++, VB.NET....
Category: .Net Framework Date: 10/13/2010 10:02:48 PM