Click here to Skip to main content
16,006,510 members
Home / Discussions / C#
   

C#

 
QuestionTimer Bug!!! :mad: Full code included run it and see. Plz comment why this could be hapening. Pin
serguey_haftrige23-Nov-05 17:16
serguey_haftrige23-Nov-05 17:16 
AnswerRe: Timer Bug!!! :mad: Full code included run it and see. Plz comment why this could be hapening. Pin
J4amieC23-Nov-05 22:10
J4amieC23-Nov-05 22:10 
QuestionRetrieving real-time info from bank website Pin
neax23-Nov-05 16:04
neax23-Nov-05 16:04 
AnswerRe: Retrieving real-time info from bank website Pin
Mark DeVol29-Nov-05 12:15
Mark DeVol29-Nov-05 12:15 
QuestionRe: Retrieving real-time info from bank website Pin
neax29-Nov-05 12:19
neax29-Nov-05 12:19 
AnswerRe: Retrieving real-time info from bank website Pin
Mark DeVol29-Nov-05 12:33
Mark DeVol29-Nov-05 12:33 
QuestionIEnumerable and IEnumerator Pin
Alex Cutovoi23-Nov-05 15:32
Alex Cutovoi23-Nov-05 15:32 
QuestionIEnumerable and IEnumerator Pin
Alex Cutovoi23-Nov-05 15:31
Alex Cutovoi23-Nov-05 15:31 
Hi fellows

My question is simple:
I have a very little program that I've created to understand the IEnumerator interface.
Here is a little piece of my software
//Method to populate my array
private void PopulateArrayList()
{
for(int i = 0 ; i < 4 ; i++)
{
m_MyDoors.Add(new Doors());
}
}
public void WhatDoorsIsOpened()
{
object CurrentDoor;
int i = 1;
IEnumerator NumberedDoors = m_MyDoors.GetEnumerator();
while(NumberedDoors.MoveNext())
{
CurrentDoor = NumberedDoors.Current;
if(((Doors)CurrentDoor).OpenClose() == false)
{
Console.WriteLine("Door {0} is opened.", i);
i += 1;
}
else
{
i += 1;
}
}
}
I've read in MSDN that IEnumerator supports a simple iteration over a collection. In this line of code:
IEnumerator NumberedDoors = m_MyDoors.GetEnumerator();
I'm just assigning the m_MyDoors' IEnumerable typed collection in the NumberedDoors, right?
In the MSDN too the following was wrote about IEnumerable:
Exposes the enumerator, which supports a simple iteration over a collection.

I've understand that IEnumerator assigns a typed collection.

I did'n understand so good the IEnumerator. The IEnumerable I didn't understand nothing?

Can anyone helps?



Thanks
Questionselect date into the textbox Pin
momoo23-Nov-05 13:53
momoo23-Nov-05 13:53 
AnswerRe: select date into the textbox Pin
Christian Graus23-Nov-05 14:37
protectorChristian Graus23-Nov-05 14:37 
Questionprocess.start Pin
Sam 200623-Nov-05 11:51
Sam 200623-Nov-05 11:51 
AnswerRe: process.start Pin
Curtis Schlak.23-Nov-05 12:03
Curtis Schlak.23-Nov-05 12:03 
QuestionDelegates and events Pin
mirano23-Nov-05 9:21
mirano23-Nov-05 9:21 
AnswerRe: Delegates and events Pin
Leslie Sanford23-Nov-05 11:46
Leslie Sanford23-Nov-05 11:46 
GeneralRe: Delegates and events Pin
mirano23-Nov-05 13:00
mirano23-Nov-05 13:00 
GeneralRe: Delegates and events Pin
Leslie Sanford23-Nov-05 13:23
Leslie Sanford23-Nov-05 13:23 
GeneralRe: Delegates and events Pin
mirano26-Nov-05 6:19
mirano26-Nov-05 6:19 
GeneralRe: Delegates and events Pin
Leslie Sanford26-Nov-05 7:08
Leslie Sanford26-Nov-05 7:08 
GeneralRe: Delegates and events Pin
mirano27-Nov-05 9:07
mirano27-Nov-05 9:07 
QuestionSounds - what were they thinking - they forgot about sound!!!!! Pin
Giles23-Nov-05 9:03
Giles23-Nov-05 9:03 
AnswerRe: Sounds - what were they thinking - they forgot about sound!!!!! Pin
Leslie Sanford23-Nov-05 9:21
Leslie Sanford23-Nov-05 9:21 
GeneralRe: Sounds - what were they thinking - they forgot about sound!!!!! Pin
Giles23-Nov-05 9:48
Giles23-Nov-05 9:48 
GeneralRe: Sounds - what were they thinking - they forgot about sound!!!!! Pin
Leslie Sanford23-Nov-05 10:49
Leslie Sanford23-Nov-05 10:49 
GeneralRe: Sounds - what were they thinking - they forgot about sound!!!!! Pin
Giles23-Nov-05 11:43
Giles23-Nov-05 11:43 
QuestionPrinter driver Pin
hg270523-Nov-05 8:45
hg270523-Nov-05 8:45 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.