Click here to Skip to main content
15,867,568 members
Home / Discussions / C#
   

C#

 
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 
To get the line number, you would need to either keep a counter, like so:

Int32 lineNumber = 0;
foreach (String line in lines) {
    lineNumber++;
    // ...
}


or you could switch to the for[^] loop (instead of a foreach[^] loop), like so:

for (Int32 i = 0; i < lines.Length; i++) {
    String line = lines[i];
    Int32 lineNumber = i + 1;
    // ...
}



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 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 
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 
GeneralRe: can u help me with a if question? [modified] Pin
andredani5-Sep-07 11:31
andredani5-Sep-07 11:31 
QuestionWorkaround global variables? Pin
MeLight5-Sep-07 8:36
MeLight5-Sep-07 8:36 
AnswerRe: Workaround global variables? Pin
TJoe5-Sep-07 8:52
TJoe5-Sep-07 8:52 
AnswerRe: Workaround global variables? Pin
Christian Graus5-Sep-07 8:53
protectorChristian Graus5-Sep-07 8:53 
AnswerRe: Workaround global variables? Pin
Larantz5-Sep-07 8:53
Larantz5-Sep-07 8:53 

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.