Click here to Skip to main content
15,887,027 members
Home / Discussions / C#
   

C#

 
GeneralRe: Enumerate Custom Class Pin
Dowse2-Jul-09 5:45
Dowse2-Jul-09 5:45 
GeneralRe: Enumerate Custom Class Pin
Thomas Weller2-Jul-09 6:07
Thomas Weller2-Jul-09 6:07 
GeneralRe: Enumerate Custom Class Pin
Dowse2-Jul-09 6:10
Dowse2-Jul-09 6:10 
AnswerRe: Enumerate Custom Class Pin
Luc Pattyn2-Jul-09 5:47
sitebuilderLuc Pattyn2-Jul-09 5:47 
AnswerRe: Enumerate Custom Class Pin
Dowse2-Jul-09 6:03
Dowse2-Jul-09 6:03 
AnswerRe: Enumerate Custom Class Pin
Dowse2-Jul-09 7:01
Dowse2-Jul-09 7:01 
AnswerRe: Enumerate Custom Class Pin
DaveyM692-Jul-09 5:58
professionalDaveyM692-Jul-09 5:58 
AnswerRe: Enumerate Custom Class Pin
harold aptroot2-Jul-09 6:44
harold aptroot2-Jul-09 6:44 
public class MyClass : IEnumerable<put type here> //IEnumerable<t> is better (no boxing)
{
public System.DateTime datStart; //Schedule start date
public System.DateTime datEnd; //Date of final occurrence (#1/1/1900# if N/A)
public int intParam1; //Various Uses
public int intParam2; //Various Uses
//Other fields remove for clarity

//Constructor
public MyClass()
{
//Set defaults for new MyClass()
datStart = new DateTime(1900, 1, 1);
datEnd = datStart;
intParam1 = -1;
intParam2 = -1;
}

public IEnumerator<put type here> GetEnumerator()
{
yield return someStuff; //put more of them here possible in a loop, the compiler will make a state machine out of it
}

IEnumerator IEnumerable.GetEnumerator()
{
return GetEnumerator(); //this does not loop, it calls the other GetEnumerator
}
}



QuestionThreading Pin
Wogboiii2-Jul-09 4:23
Wogboiii2-Jul-09 4:23 
AnswerRe: Threading Pin
Luc Pattyn2-Jul-09 4:26
sitebuilderLuc Pattyn2-Jul-09 4:26 
AnswerRe: Threading Pin
led mike2-Jul-09 4:36
led mike2-Jul-09 4:36 
GeneralRe: Threading Pin
DaveyM692-Jul-09 6:01
professionalDaveyM692-Jul-09 6:01 
AnswerRe: Threading Pin
Thomas Weller2-Jul-09 5:48
Thomas Weller2-Jul-09 5:48 
GeneralRe: Threading Pin
Paulo Zemek2-Jul-09 8:56
mvaPaulo Zemek2-Jul-09 8:56 
GeneralDatagridview... Pin
Isaac Gordon2-Jul-09 2:55
Isaac Gordon2-Jul-09 2:55 
GeneralRe: Datagridview... Pin
Henry Minute2-Jul-09 4:01
Henry Minute2-Jul-09 4:01 
GeneralRe: Datagridview... Pin
musefan2-Jul-09 4:15
musefan2-Jul-09 4:15 
QuestionWrting Image data in Mifare 1k card Pin
GauravKP2-Jul-09 2:43
professionalGauravKP2-Jul-09 2:43 
AnswerRe: Wrting Image data in Mifare 1k card Pin
Rajesh R Subramanian2-Jul-09 3:07
professionalRajesh R Subramanian2-Jul-09 3:07 
Questionwhat do i have to do next Pin
j4ck1we2-Jul-09 2:20
j4ck1we2-Jul-09 2:20 
AnswerRe: what do i have to do next Pin
dojohansen2-Jul-09 2:27
dojohansen2-Jul-09 2:27 
JokeRe: what do i have to do next Pin
musefan2-Jul-09 2:34
musefan2-Jul-09 2:34 
AnswerRe: what do i have to do next Pin
musefan2-Jul-09 2:30
musefan2-Jul-09 2:30 
AnswerRe: what do i have to do next Pin
j4ck1we2-Jul-09 7:32
j4ck1we2-Jul-09 7:32 
QuestionIOException and Number formatting Pin
Megidolaon2-Jul-09 1:55
Megidolaon2-Jul-09 1:55 

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.