Click here to Skip to main content
15,888,113 members
Home / Discussions / C#
   

C#

 
GeneralRe: list add method Pin
musefan27-Jul-09 11:20
musefan27-Jul-09 11:20 
GeneralRe: list add method Pin
DaveyM6927-Jul-09 13:17
professionalDaveyM6927-Jul-09 13:17 
GeneralRe: list add method Pin
Charlesh327-Jul-09 11:46
Charlesh327-Jul-09 11:46 
GeneralRe: list add method Pin
DaveyM6927-Jul-09 13:18
professionalDaveyM6927-Jul-09 13:18 
Questionencoded using the 16-bit UCS-2 character Pin
Flex.Me27-Jul-09 7:43
Flex.Me27-Jul-09 7:43 
AnswerRe: encoded using the 16-bit UCS-2 character Pin
Alan N27-Jul-09 9:34
Alan N27-Jul-09 9:34 
QuestionFunction to Find and Replace in C# Pin
GrgBalden27-Jul-09 6:39
GrgBalden27-Jul-09 6:39 
AnswerRe: Function to Find and Replace in C# Pin
musefan27-Jul-09 6:50
musefan27-Jul-09 6:50 
GrgBalden wrote:
fileContentCopy.Replace(istring1, ostring1);
fileContentCopy.Replace(istring2, ostring2);


String.Replace function returns an altered string, it does not change the instance itself.

You need to use...

fileContentCopy = fileContentCopy.Replace(istring1, ostring1);
fileContentCopy = fileContentCopy.Replace(istring2, ostring2);



I would also like to add that reading a whole file to a string, in my opinion, is not a good thing. I would prefer to read a character at a time and match it to a set of keywords and replace any matches.

Life goes very fast. Tomorrow, today is already yesterday.

GeneralRe: Function to Find and Replace in C# Pin
GrgBalden27-Jul-09 9:08
GrgBalden27-Jul-09 9:08 
AnswerRe: Function to Find and Replace in C# Pin
musefan27-Jul-09 9:50
musefan27-Jul-09 9:50 
AnswerRe: Function to Find and Replace in C# Pin
PIEBALDconsult27-Jul-09 9:36
mvePIEBALDconsult27-Jul-09 9:36 
GeneralRe: Function to Find and Replace in C# Pin
GrgBalden27-Jul-09 9:45
GrgBalden27-Jul-09 9:45 
GeneralRe: Function to Find and Replace in C# Pin
PIEBALDconsult27-Jul-09 10:37
mvePIEBALDconsult27-Jul-09 10:37 
QuestionBlinking form when minimaze [modified] Pin
gal00027-Jul-09 6:34
gal00027-Jul-09 6:34 
AnswerRe: Blinking form when minimaze Pin
musefan27-Jul-09 6:44
musefan27-Jul-09 6:44 
AnswerRe: Blinking form when minimaze Pin
Abhijit Jana27-Jul-09 6:48
professionalAbhijit Jana27-Jul-09 6:48 
GeneralRe: Blinking form when minimaze Pin
gal00027-Jul-09 8:42
gal00027-Jul-09 8:42 
AnswerRe: Blinking form when minimaze Pin
PIEBALDconsult27-Jul-09 9:39
mvePIEBALDconsult27-Jul-09 9:39 
GeneralRe: Blinking form when minimaze Pin
tamir90127-Jul-09 19:59
tamir90127-Jul-09 19:59 
QuestionCodeGenerator to generate async interface from sync? Pin
pioner27-Jul-09 5:56
pioner27-Jul-09 5:56 
QuestionProblems in deployment of c# BHO Pin
svt gdwl27-Jul-09 4:46
svt gdwl27-Jul-09 4:46 
QuestionHow to disable Task manager, esc,windows keys.................. Pin
Member 423560127-Jul-09 3:49
Member 423560127-Jul-09 3:49 
AnswerRe: How to disable Task manager, esc,windows keys.................. Pin
Manas Bhardwaj27-Jul-09 4:01
professionalManas Bhardwaj27-Jul-09 4:01 
AnswerRe: How to disable Task manager, esc,windows keys.................. Pin
Abhijit Jana27-Jul-09 4:07
professionalAbhijit Jana27-Jul-09 4:07 
GeneralRe: How to disable Task manager, esc,windows keys.................. Pin
musefan27-Jul-09 4:07
musefan27-Jul-09 4: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.