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

C#

 
JokeRe: Query Regarding SetPublicKeyToken Pin
Amar Chaudhary5-Sep-07 9:11
Amar Chaudhary5-Sep-07 9:11 
QuestionRe: Query Regarding SetPublicKeyToken Pin
Amar Chaudhary5-Sep-07 9:13
Amar Chaudhary5-Sep-07 9:13 
AnswerRe: Query Regarding SetPublicKeyToken Pin
Dave Kreskowiak5-Sep-07 9:17
mveDave Kreskowiak5-Sep-07 9:17 
GeneralRe: Query Regarding SetPublicKeyToken Pin
Amar Chaudhary5-Sep-07 9:54
Amar Chaudhary5-Sep-07 9:54 
AnswerRe: Query Regarding SetPublicKeyToken Pin
TJoe5-Sep-07 9:21
TJoe5-Sep-07 9:21 
JokeRe: Query Regarding SetPublicKeyToken Pin
Amar Chaudhary5-Sep-07 9:39
Amar Chaudhary5-Sep-07 9:39 
GeneralRe: Query Regarding SetPublicKeyToken Pin
TJoe5-Sep-07 9:50
TJoe5-Sep-07 9:50 
GeneralRe: Query Regarding SetPublicKeyToken Pin
Amar Chaudhary5-Sep-07 9:58
Amar Chaudhary5-Sep-07 9:58 
Questioncan u help me with a if question? Pin
andredani5-Sep-07 8:39
andredani5-Sep-07 8:39 
AnswerRe: can u help me with a if question? Pin
Larantz5-Sep-07 8:44
Larantz5-Sep-07 8:44 
AnswerRe: can u help me with a if question? Pin
TJoe5-Sep-07 8:46
TJoe5-Sep-07 8:46 
GeneralRe: can u help me with a if question? Pin
andredani6-Sep-07 0:32
andredani6-Sep-07 0:32 
GeneralRe: can u help me with a if question? Pin
TJoe6-Sep-07 1:58
TJoe6-Sep-07 1:58 
GeneralRe: can u help me with a if question? Pin
andredani6-Sep-07 3:08
andredani6-Sep-07 3:08 
GeneralRe: can u help me with a if question? Pin
TJoe6-Sep-07 3:15
TJoe6-Sep-07 3:15 
GeneralRe: can u help me with a if question? [modified] Pin
andredani6-Sep-07 3:34
andredani6-Sep-07 3:34 
GeneralRe: can u help me with a if question? Pin
TJoe6-Sep-07 3:40
TJoe6-Sep-07 3:40 
GeneralRe: can u help me with a if question? Pin
andredani6-Sep-07 4:02
andredani6-Sep-07 4:02 
GeneralRe: can u help me with a if question? Pin
TJoe6-Sep-07 5:29
TJoe6-Sep-07 5:29 
Based on the example above, the code below will properly parse it out. I included comments so that you can understand what it's doing and learn from it. But, if you have an questions then let me know.

// This index will point to the current line and will start with
//   the first line.
Int32 index = 0;

// We want to loop while there are valid blocks. This means that
//   if our index is pointing to the first line, then there must
//   be atleast 6 lines left (one for each item in the block).
while (lines.Length >= index + 6) {
    // At this point we know that index should point to the start
    //   of a block. We also know that there are atleast 5 more
    //   lines beyond the current line (e.g. the one pointed to
    //   by index).
    //

    // Make sure that the block starts with a #, if not then we
    //   will skip this line and contine the loop. This means
    //   that if there is some extras lines after a block (either
    //   blank or just junk), then we will skip them.
    if ("#" != lines[index].Trim()) {
        // It's not a #, so it's a bad line we will skip it by
        //   incrementing the index, then start the loop again
        //   and hopefully this time we will be at the start of
        //   a valid block.
        index++;
        continue;
    }

    // The current line is a valid block indicator and we know
    //   that the 5 other pieces of information are available
    //   in the lines variable. So pull them out.
    String name1 = lines[index + 1];
    String path1 = lines[index + 2];
    String path2 = lines[index + 3];
    String price = lines[index + 4];
    String name2 = lines[index + 5];

    // Now we can skip over the lines we just read, which should
    //   move us to the next block.
    index += 6;

    // TODO: Do something with this information.
}


Take care,
Tom

-----------------------------------------------
Check out my blog at http://tjoe.wordpress.com

GeneralRe: can u help me with a if question? Pin
andredani6-Sep-07 11:25
andredani6-Sep-07 11:25 
GeneralRe: can u help me with a if question? Pin
TJoe7-Sep-07 2:15
TJoe7-Sep-07 2:15 
GeneralRe: can u help me with a if question? Pin
andredani7-Sep-07 2:54
andredani7-Sep-07 2:54 
GeneralRe: can u help me with a if question? Pin
TJoe7-Sep-07 3:12
TJoe7-Sep-07 3:12 
GeneralRe: can u help me with a if question? Pin
andredani7-Sep-07 5:13
andredani7-Sep-07 5:13 
AnswerRe: can u help me with a if question? Pin
Luc Pattyn5-Sep-07 9:59
sitebuilderLuc Pattyn5-Sep-07 9:59 

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.