Click here to Skip to main content
15,895,799 members
Home / Discussions / C#
   

C#

 
GeneralRe: anti-pattern in GC Pin
George_George29-Apr-08 4:59
George_George29-Apr-08 4:59 
GeneralRe: anti-pattern in GC Pin
led mike29-Apr-08 5:40
led mike29-Apr-08 5:40 
GeneralRe: anti-pattern in GC Pin
George_George29-Apr-08 20:41
George_George29-Apr-08 20:41 
GeneralRe: anti-pattern in GC Pin
led mike30-Apr-08 4:50
led mike30-Apr-08 4:50 
GeneralRe: anti-pattern in GC Pin
George_George30-Apr-08 22:06
George_George30-Apr-08 22:06 
GeneralRe: anti-pattern in GC Pin
led mike1-May-08 6:18
led mike1-May-08 6:18 
GeneralRe: anti-pattern in GC Pin
George_George1-May-08 21:47
George_George1-May-08 21:47 
Generalinserting string into string Pin
stephan_00729-Apr-08 2:59
stephan_00729-Apr-08 2:59 
hy everyone!

sorry for me asking again, but i am not sure how to do this:

i read from a file which is a outputtemplate (i have fields in there which have to be replaced by it's values).

then there are two line which describes the table e.g.
|tag1_01|  |tag2_01|      |tag3_01|          |tag4_01|  |tag5_01|
     |tag6_01|      |tag7_01|      |tag8_01|


(the location of the tags and finally the values are important, because otherwise it won't appear to be a table Big Grin | :-D

the _01 is used to help me replace the tags with it's values.

so lets say i do want to duplicate this line ten times to finally have 11 lines.
the replacement of the _01 to _02 etc. isn't the challange for me, but i wonder how to insert the new lines at the correct location. because as far as i know i am only able to insert it at an index position. well, in my case i would try to find the _01 entries by reading line after line in the file. when i find it i copy these two lines to a tempstringvariable. then loop for the desired number, replace _01 by _02 etc.
now the tricky part: i have to find out at which position the two lines end. well i guess this is indexof(tempstring) + tempstring.length + 2 (linefeed). and then insert the lines + linefeeds into there.

but isn't there an easier way like "insert line after this line"?

thanks for any further hint which help me realize this in a more easy way!

stephan.
GeneralRe: inserting string into string Pin
carbon_golem29-Apr-08 3:58
carbon_golem29-Apr-08 3:58 
GeneralRe: inserting string into string Pin
carbon_golem29-Apr-08 3:59
carbon_golem29-Apr-08 3:59 
QuestionC# TextBox with forward slash Pin
WaleedH29-Apr-08 2:52
WaleedH29-Apr-08 2:52 
GeneralRe: C# TextBox with forward slash Pin
Bert delaVega29-Apr-08 4:00
Bert delaVega29-Apr-08 4:00 
GeneralRe: C# TextBox with forward slash [modified] Pin
WaleedH1-May-08 1:52
WaleedH1-May-08 1:52 
QuestionThe best overload method match system.IComparable has invalid arguments Pin
ADTC#29-Apr-08 2:15
ADTC#29-Apr-08 2:15 
GeneralRe: The best overload method match system.IComparable has invalid arguments Pin
Guffa29-Apr-08 2:52
Guffa29-Apr-08 2:52 
QuestionI tried tht earlier and i gott this error "Patient cannot implement interface member System.IComparable.CompareTo(Object)" Pin
ADTC#29-Apr-08 3:02
ADTC#29-Apr-08 3:02 
AnswerRe: I tried tht earlier and i gott this error "Patient cannot implement interface member System.IComparable.CompareTo(Object)" Pin
J a a n s29-Apr-08 3:06
professionalJ a a n s29-Apr-08 3:06 
Generalyet another one cropped up Pin
ADTC#29-Apr-08 3:14
ADTC#29-Apr-08 3:14 
GeneralRe: yet another one cropped up Pin
J a a n s29-Apr-08 3:28
professionalJ a a n s29-Apr-08 3:28 
GeneralThank you Pin
ADTC#29-Apr-08 4:30
ADTC#29-Apr-08 4:30 
AnswerRe: The best overload method match system.IComparable has invalid arguments Pin
J a a n s29-Apr-08 2:54
professionalJ a a n s29-Apr-08 2:54 
QuestionDoesnot implement interface member System.IComparable.CompareTo(Object) Pin
ADTC#29-Apr-08 3:06
ADTC#29-Apr-08 3:06 
AnswerRe: Doesnot implement interface member System.IComparable.CompareTo(Object) Pin
J a a n s29-Apr-08 3:09
professionalJ a a n s29-Apr-08 3:09 
Questionyet another one cropped up Pin
ADTC#29-Apr-08 3:19
ADTC#29-Apr-08 3:19 
GeneralInstallation Pin
coders_need29-Apr-08 1:14
coders_need29-Apr-08 1:14 

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.