Tutorials
Resources
Forum
Interview
Jobs
Projects
Offshore Development
Mentor
|
Code Converter
|
Articles
|
Code Factory
|
Computer Jokes
|
Members
|
Peer Appraisal
|
IT Companies
|
Bookmarks
|
Revenue Sharing
|
Talk to Us
|
My Profile
Sign In
Register
AdSense Revenue
Gifts
Active Members
Today
Sridhar R
(417)
G.Rengan
(275)
sajid pk
(46)
Last 7 Days
Sridhar R
(4152)
Ashok Khanna
(1481)
G.Rengan
(1208)
more...
Generics--- Using IEnumerable and yield
Posted Date: 13 May 2008 Resource Type:
Code Snippets
Category:
C# Syntax
Posted By:
shakti singh tanwar
Member Level:
Diamond
Rating:
Points
: 10
public class CityCollection : IEnumerable
{
public IEnumerator
GetEnumerator()
{
yield return "New York";
yield return "Paris";
yield return "London";
}
IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator();
}
}
Now you can create an object of CityColletion class and call GetEnumerator methon on it to get the items from collection.
Responses
No responses found. Be the first to respond and make money from
revenue sharing program
.
Feedbacks
Popular Tags
What are tags ?
Search Tags
Sign In
(No tags found.)
Post Feedback
This is a strictly moderated forum. Only approved messages will appear in the site. Please use 'Spell Check' in Google toolbar before you submit.
You must
Sign In
to post a response.
Next Resource:
Delete text file file
Previous Resource:
How to print a page in ASP.Net
Return to Discussion Resource Index
Post New Resource
Category:
C# Syntax
Post resources and
earn money
!
Related Resources
How to Swap two value with out using temp
Reading Excel Sheet Names in C#
convert milliseconds into time
Remoting
file uplaod and edit in datagrid
Read
TATA Nano reviews
.
dotNet Slackers
BizTalk Adaptors
Web Design
Scripts
Are you waiting for engineering entrance result? Watch here for
engineering entrance results
.
doors in nj
Contact Us
Privacy Policy
Terms Of Use