943,812 Members | Top Members by Rank

Ad:
  • C# Discussion Thread
  • Unsolved
  • Views: 463
  • C# RSS
Jul 18th, 2009
0

Accessing vaules using foreach ...

Expand Post »
Hi,
Environment.SpecialFolder , this returns a enum without having a
public GetEnumerator(); ,
, can u tell me how to access the values like by using foreach statement?
Similar Threads
Reputation Points: 26
Solved Threads: 0
Junior Poster in Training
RahulV is offline Offline
92 posts
since Jun 2007
Jul 18th, 2009
2

Re: Accessing vaules using foreach ...

Maybe this?
C# Syntax (Toggle Plain Text)
  1. foreach(string s in Enum.GetNames(typeof(Environment.SpecialFolder)))
  2. Console.WriteLine(s);
Reputation Points: 29
Solved Threads: 1
Junior Poster in Training
agent154 is offline Offline
72 posts
since Jul 2009
Jul 20th, 2009
0

Re: Accessing vaules using foreach ...

Thanks that worked well.
Reputation Points: 26
Solved Threads: 0
Junior Poster in Training
RahulV is offline Offline
92 posts
since Jun 2007
Jul 20th, 2009
0

Re: Accessing vaules using foreach ...

As you're online. Please mark it as solved.
Featured Poster
Reputation Points: 480
Solved Threads: 276
Postaholic
Ramy Mahrous is offline Offline
2,189 posts
since Aug 2006

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C# Forum Timeline: 2000 and 2005(urgent plz)
Next Thread in C# Forum Timeline: How do I point to data in my project?





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC