Click here to Skip to main content
15,889,335 members
Home / Discussions / C#
   

C#

 
AnswerRe: Any Ideas or feedback for a C# final year programming project? Pin
AmitGajjar4-Sep-13 21:12
professionalAmitGajjar4-Sep-13 21:12 
AnswerRe: Any Ideas or feedback for a C# final year programming project? Pin
V.6-Sep-13 1:56
professionalV.6-Sep-13 1:56 
QuestionParse a FlatFile with Multiline using BizTalk Pin
Ahmed Abdelnasser4-Sep-13 0:57
Ahmed Abdelnasser4-Sep-13 0:57 
QuestionWebsite visit automation script Pin
Neo101014-Sep-13 0:09
Neo101014-Sep-13 0:09 
AnswerRe: Website visit automation script Pin
Richard MacCutchan4-Sep-13 4:52
mveRichard MacCutchan4-Sep-13 4:52 
QuestionPrinting a bill format Pin
prerana patil3-Sep-13 22:59
prerana patil3-Sep-13 22:59 
AnswerRe: Printing a bill format Pin
OriginalGriff3-Sep-13 23:30
mveOriginalGriff3-Sep-13 23:30 
QuestionDaft question on indenting text. Pin
Septimus Hedgehog3-Sep-13 5:21
Septimus Hedgehog3-Sep-13 5:21 
I want to write some trace messages to a text file. The same methods could be called in different places. So, if I have something like method A calls B calls C calls B calls E calls C calls D, E, F, I'd like my trace file to show an indentation like this (assume the full stop implies a space character):

A
.B
..C
...B
....E
.....C
......D
......E
......F

Edit: I forgot to mention there's no recursion and the calls to C might not even get called, that sort of thing.

So, method C is called in different places and I'd like to reflect the "depth" where its called from. An old trick is to have a global variable that you increment/decrement but that's really messy. It's not essential that I do what I'd like but it would make the trace file easier to read if things are indented. I know it's a daft question with a limited shelf-life but if anyone does know a quick trick that'd do it for me, I'd be happy to test it.

Tks.
If there is one thing more dangerous than getting between a bear and her cubs it's getting between my wife and her chocolate.


modified 3-Sep-13 11:37am.

GeneralRe: Daft question on indenting text. Pin
harold aptroot3-Sep-13 5:36
harold aptroot3-Sep-13 5:36 
AnswerRe: Daft question on indenting text. Pin
Dave Kreskowiak3-Sep-13 5:37
mveDave Kreskowiak3-Sep-13 5:37 
AnswerRe: Daft question on indenting text. Pin
Septimus Hedgehog3-Sep-13 5:58
Septimus Hedgehog3-Sep-13 5:58 
AnswerRe: Daft question on indenting text. Pin
jschell3-Sep-13 12:40
jschell3-Sep-13 12:40 
GeneralRe: Daft question on indenting text. Pin
Septimus Hedgehog3-Sep-13 20:36
Septimus Hedgehog3-Sep-13 20:36 
AnswerRe: Daft question on indenting text. Pin
BillWoodruff3-Sep-13 17:24
professionalBillWoodruff3-Sep-13 17:24 
GeneralRe: Daft question on indenting text. Pin
Septimus Hedgehog3-Sep-13 20:45
Septimus Hedgehog3-Sep-13 20:45 
GeneralRe: Daft question on indenting text. Pin
BillWoodruff3-Sep-13 23:29
professionalBillWoodruff3-Sep-13 23:29 
GeneralRe: Daft question on indenting text. Pin
Septimus Hedgehog4-Sep-13 0:35
Septimus Hedgehog4-Sep-13 0:35 
GeneralRe: Daft question on indenting text. Pin
BillWoodruff4-Sep-13 3:52
professionalBillWoodruff4-Sep-13 3:52 
GeneralRe: Daft question on indenting text. Pin
Septimus Hedgehog4-Sep-13 6:00
Septimus Hedgehog4-Sep-13 6:00 
AnswerRe: Daft question on indenting text. Pin
Bernhard Hiller3-Sep-13 22:40
Bernhard Hiller3-Sep-13 22:40 
GeneralRe: Daft question on indenting text. Pin
Septimus Hedgehog4-Sep-13 0:15
Septimus Hedgehog4-Sep-13 0:15 
QuestionSubstring / Split String help Pin
Member 101198373-Sep-13 5:02
Member 101198373-Sep-13 5:02 
AnswerRe: Substring / Split String help Pin
Dave Kreskowiak3-Sep-13 5:30
mveDave Kreskowiak3-Sep-13 5:30 
GeneralRe: Substring / Split String help Pin
Member 101198373-Sep-13 5:39
Member 101198373-Sep-13 5:39 
GeneralRe: Substring / Split String help Pin
Dave Kreskowiak3-Sep-13 5:47
mveDave Kreskowiak3-Sep-13 5:47 

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.