Click here to Skip to main content
15,900,110 members
Home / Discussions / C#
   

C#

 
AnswerRe: PictureBox contents lost when focus lost Pin
Luc Pattyn17-Jun-07 11:19
sitebuilderLuc Pattyn17-Jun-07 11:19 
AnswerRe: PictureBox contents lost when focus lost Pin
Christian Graus17-Jun-07 11:36
protectorChristian Graus17-Jun-07 11:36 
GeneralRe: PictureBox contents lost when focus lost Pin
rbengali317-Jun-07 17:32
rbengali317-Jun-07 17:32 
GeneralRe: PictureBox contents lost when focus lost Pin
Christian Graus17-Jun-07 20:13
protectorChristian Graus17-Jun-07 20:13 
AnswerRe: PictureBox contents lost when focus lost Pin
Hesham Yassin20-Jun-07 0:21
Hesham Yassin20-Jun-07 0:21 
QuestionGeneric Collection &Method Problem Pin
haz1317-Jun-07 10:40
haz1317-Jun-07 10:40 
AnswerRe: Generic Collection &Method Problem Pin
User 665817-Jun-07 10:51
User 665817-Jun-07 10:51 
QuestionRe: Generic Collection &Method Problem Pin
haz1317-Jun-07 11:48
haz1317-Jun-07 11:48 
Sorry Greeeg I don't understand how that would help what I'm doing (please explain more - maybe I haven't explined it very well)? Basically I need to itterate through all the collection object fields in turn. I have a method that does it for one of the fields, but instead of copying it 100 times and slightly changing the field refernces I was trying to create a method that was more generic (this is the bit I can't get my head around).

CardDataCollection[0].Card1
CardDataCollection[1].Card1
CardDataCollection[2].Card1
CardDataCollection[3].Card1
CardDataCollection[4].Card1
CardDataCollection[5].Card1
to end of collection

Then I need to do the same for the Card2 field
And so on for each of the remaining Card fields upto 100

CardDataCollection[0].Card100
CardDataCollection[1].Card100
CardDataCollection[2].Card100
CardDataCollection[3].Card100
CardDataCollection[4].Card100
CardDataCollection[5].Card100
to end of collection

Put another way I need one method to prevent me creating 100 very similar methods as described below.



public static void CalcDataCard1()
{

    int i;

    for (i = 0; i < CardDataCollection.Count; i++)
    {
        if (CardDataCollection[i].Card1 == 1)
        {
            //do data processing here
        }
    }
}

public static void CalcDataCard2()
{

    int i;

    for (i = 0; i < CardDataCollection.Count; i++)
    {
        if (CardDataCollection[i].Card2 == 1)
        {
            //do data processing here
        }
    }
}

public static void CalcDataCard3()
{

    int i;

    for (i = 0; i < CardDataCollection.Count; i++)
    {
        if (CardDataCollection[i].Card3 == 1)
        {
            //do data processing here
        }
    }
}


Thanks again for any help.

Haz

AnswerRe: Generic Collection &Method Problem Pin
Christian Graus17-Jun-07 12:24
protectorChristian Graus17-Jun-07 12:24 
QuestionExport data to excel sheet Pin
HexaDeveloper17-Jun-07 9:32
HexaDeveloper17-Jun-07 9:32 
AnswerRe: Export data to excel sheet Pin
Jimmanuel18-Jun-07 3:48
Jimmanuel18-Jun-07 3:48 
GeneralRe: Export data to excel sheet Pin
HexaDeveloper21-Jun-07 2:17
HexaDeveloper21-Jun-07 2:17 
GeneralRe: Export data to excel sheet Pin
Jimmanuel21-Jun-07 2:23
Jimmanuel21-Jun-07 2:23 
QuestionComboBox change font on specific item.. Pin
akkram17-Jun-07 9:16
akkram17-Jun-07 9:16 
AnswerRe: ComboBox change font on specific item.. Pin
Dave Kreskowiak17-Jun-07 12:38
mveDave Kreskowiak17-Jun-07 12:38 
QuestionConnecting to FTP site Pin
frqftgbdafr17-Jun-07 9:01
frqftgbdafr17-Jun-07 9:01 
QuestionThe DateTime Value Type Pin
Brendan Vogt17-Jun-07 8:24
Brendan Vogt17-Jun-07 8:24 
AnswerRe: The DateTime Value Type Pin
Guffa17-Jun-07 8:54
Guffa17-Jun-07 8:54 
QuestionRe: The DateTime Value Type Pin
Brendan Vogt17-Jun-07 9:03
Brendan Vogt17-Jun-07 9:03 
AnswerRe: The DateTime Value Type Pin
User 665817-Jun-07 9:11
User 665817-Jun-07 9:11 
AnswerRe: The DateTime Value Type Pin
Luc Pattyn17-Jun-07 9:34
sitebuilderLuc Pattyn17-Jun-07 9:34 
GeneralRe: The DateTime Value Type Pin
PIEBALDconsult17-Jun-07 14:45
mvePIEBALDconsult17-Jun-07 14:45 
QuestionCreating list of method execution time Pin
AndrusM17-Jun-07 5:10
AndrusM17-Jun-07 5:10 
AnswerRe: Creating list of method execution time Pin
Guffa17-Jun-07 7:05
Guffa17-Jun-07 7:05 
GeneralRe: Creating list of method execution time Pin
AndrusM18-Jun-07 3:07
AndrusM18-Jun-07 3:07 

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.