string.replace
-
Hi all, I need your help in replace function......... Please look the code below.....
string File; File = "C:\\Documents and Settings\\sxavier\\Desktop\\prasobh.doc"; string strFileName = File;
I would like to replace \\ with \... I have tried the line below , but will not work....strFileName = strFileName.Replace("\\", "\");
Please guide me .... Thanks in advance Sebastian -
Hi all, I need your help in replace function......... Please look the code below.....
string File; File = "C:\\Documents and Settings\\sxavier\\Desktop\\prasobh.doc"; string strFileName = File;
I would like to replace \\ with \... I have tried the line below , but will not work....strFileName = strFileName.Replace("\\", "\");
Please guide me .... Thanks in advance SebastianSebastian T Xavier wrote:
strFileName = strFileName.Replace("\\", "\");
strFileName = strFileName.Replace("\\", @"\");
-
Hi all, I need your help in replace function......... Please look the code below.....
string File; File = "C:\\Documents and Settings\\sxavier\\Desktop\\prasobh.doc"; string strFileName = File;
I would like to replace \\ with \... I have tried the line below , but will not work....strFileName = strFileName.Replace("\\", "\");
Please guide me .... Thanks in advance SebastianSebastian T Xavier wrote:
strFileName = strFileName.Replace("\\", "\");
It breaks "Build" with the error "Newline in constant".
Sebastian T Xavier wrote:
strFileName = strFileName.Replace("\\", "\");
strFileName = strFileName.Replace("\\", "\");
strFileName = strFileName.Replace(@"\\", @"\");
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
-
Hi all, I need your help in replace function......... Please look the code below.....
string File; File = "C:\\Documents and Settings\\sxavier\\Desktop\\prasobh.doc"; string strFileName = File;
I would like to replace \\ with \... I have tried the line below , but will not work....strFileName = strFileName.Replace("\\", "\");
Please guide me .... Thanks in advance Sebastianhi, try to use / instead of \ otherwise use @"\". \ is a new line character in C# and your code will work only in vb.net. So it is better to avoid it.
All The Best Sathesh Pandian
-
Hi all, I need your help in replace function......... Please look the code below.....
string File; File = "C:\\Documents and Settings\\sxavier\\Desktop\\prasobh.doc"; string strFileName = File;
I would like to replace \\ with \... I have tried the line below , but will not work....strFileName = strFileName.Replace("\\", "\");
Please guide me .... Thanks in advance Sebastiantry with this Replace("\\", @"\"); Best Regard Pathan
GOD HELP THOSE WHO HELP THEMSELVES
-
Sebastian T Xavier wrote:
strFileName = strFileName.Replace("\\", "\");
strFileName = strFileName.Replace("\\", @"\");
Thank you Navneet,it worked sebastian
-
Sebastian T Xavier wrote:
strFileName = strFileName.Replace("\\", "\");
It breaks "Build" with the error "Newline in constant".
Sebastian T Xavier wrote:
strFileName = strFileName.Replace("\\", "\");
strFileName = strFileName.Replace("\\", "\");
strFileName = strFileName.Replace(@"\\", @"\");
Vasudevan Deepak Kumar Personal Homepage Tech Gossips
Thank you........... sebastian
-
hi, try to use / instead of \ otherwise use @"\". \ is a new line character in C# and your code will work only in vb.net. So it is better to avoid it.
All The Best Sathesh Pandian
Thank you............. sebastian
-
try with this Replace("\\", @"\"); Best Regard Pathan
GOD HELP THOSE WHO HELP THEMSELVES
Thank you........... Sebastian