473,386 Members | 1,715 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,386 software developers and data experts.

How can I remove the escape character?

string str ="\"C:\Program Files\Internet Explorer\iexplore.exe\" -nohome"
How can I remove charcter to
string str = ="C:\Program Files\Internet Explorer\iexplore.exe -nohome"

Nov 16 '05 #1
7 22541
You could do something like str.Replace("\"","")

Lowell

Steve wrote:
string str ="\"C:\Program Files\Internet Explorer\iexplore.exe\" -nohome"
How can I remove charcter to
string str = ="C:\Program Files\Internet Explorer\iexplore.exe -nohome"

Nov 16 '05 #2
On Tue, 14 Dec 2004 16:01:02 -0800, Steve wrote:
string str ="\"C:\Program Files\Internet Explorer\iexplore.exe\" -nohome"
How can I remove charcter to
string str = ="C:\Program Files\Internet Explorer\iexplore.exe -nohome"


str = str.Replace("\"", string.Empty);
--
Tom Porterfield
Nov 16 '05 #3
Steve wrote:
string str ="\"C:\Program Files\Internet Explorer\iexplore.exe\" -nohome"
How can I remove charcter to
string str = ="C:\Program Files\Internet Explorer\iexplore.exe -nohome"

I'm not entirely sure of what you are asking here, since in both
examples the escape character exists. If you mean how can you make the
string so that it "ignores" the escape character, you can define it like so:

string str = @"C:\Program Files\Internet Explorer\iexplore.exe -nohome";

The @ symbol forces the creation of a "literal string", in which escape
characters are not interpreted as such.

HTH...

Chris
Nov 16 '05 #4
str = str.Replace("\"", string.Empty); fixed my problem, thanks a lot.
I am interesting your solution "@", for I read document also mentioned @ can
remove the escape character.

this is my code
RegistryKey readiexplorer1 =
Registry.ClassesRoot.OpenSubKey(iexplorer_registry , true);
String default_iexplorer = (String)readiexplorer1.GetValue("");
string launch_iexplorer_path = default_iexplorer +
default_command_path;
RegistryKey readiexplorer2 =
Registry.ClassesRoot.OpenSubKey(launch_iexplorer_p ath, true);
string launch_iexplorer = (String)readiexplorer2.GetValue("");
I got launch_iexplorer ="\"C:\Program Files\Internet Explorer\iexplore.exe\"
-nohome"

How can I remove the escpe character based on @?
"Chris Hyde" wrote:
Steve wrote:
string str ="\"C:\Program Files\Internet Explorer\iexplore.exe\" -nohome"
How can I remove charcter to
string str = ="C:\Program Files\Internet Explorer\iexplore.exe -nohome"

I'm not entirely sure of what you are asking here, since in both
examples the escape character exists. If you mean how can you make the
string so that it "ignores" the escape character, you can define it like so:

string str = @"C:\Program Files\Internet Explorer\iexplore.exe -nohome";

The @ symbol forces the creation of a "literal string", in which escape
characters are not interpreted as such.

HTH...

Chris

Nov 16 '05 #5
Steve wrote:
str = str.Replace("\"", string.Empty); fixed my problem, thanks a lot.
I am interesting your solution "@", for I read document also mentioned @ can
remove the escape character.

this is my code
RegistryKey readiexplorer1 =
Registry.ClassesRoot.OpenSubKey(iexplorer_registry , true);
String default_iexplorer = (String)readiexplorer1.GetValue("");
string launch_iexplorer_path = default_iexplorer +
default_command_path;
RegistryKey readiexplorer2 =
Registry.ClassesRoot.OpenSubKey(launch_iexplorer_p ath, true);
string launch_iexplorer = (String)readiexplorer2.GetValue("");
I got launch_iexplorer ="\"C:\Program Files\Internet Explorer\iexplore.exe\"
-nohome"

How can I remove the escpe character based on @?

Instead of casting to a "String", have you tried casting to a "string"?

Chris
Nov 16 '05 #6
It begs the question why you'd want to, surely the first expression is what
you'd want, i.e. with the double quotes in?
"Steve" wrote:
string str ="\"C:\Program Files\Internet Explorer\iexplore.exe\" -nohome"
How can I remove charcter to
string str = ="C:\Program Files\Internet Explorer\iexplore.exe -nohome"

Nov 16 '05 #7
No.
Without double quote in, for I will split the string with .exe this will
cause \" in another dimension.

"Bonj" wrote:
It begs the question why you'd want to, surely the first expression is what
you'd want, i.e. with the double quotes in?
"Steve" wrote:
string str ="\"C:\Program Files\Internet Explorer\iexplore.exe\" -nohome"
How can I remove charcter to
string str = ="C:\Program Files\Internet Explorer\iexplore.exe -nohome"

Nov 16 '05 #8

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Alden Streeter | last post by:
Here is the HTML that is being output by my asp page: <a href='Files/category/computers/bigimages/computers-sub-monitors.jpg' target='_blank' onMouseOver="window.status='Click for a larger image...
1
by: Grant Allen | last post by:
I know this has been asked before - I've trawled through the mail archives and FAQs looking for any info, and only found "that's the way it works" answers. Basically, I want to turn off backslash...
1
by: PMCG | last post by:
Hi I am using the XMLSerializer class to serialize a custom class into a memory stream whose contents i then pass to a MSSQL SP that uses the sp_xml_preparedocument SP, i can serialize the class but...
7
by: teachtiro | last post by:
Hi, 'C' says \ is the escape character to be used when characters are to be interpreted in an uncommon sense, e.g. \t usage in printf(), but for printing % through printf(), i have read that %%...
3
by: newsgroupie | last post by:
Hi Newsgroupies, Please could someone tell me the escape character for " (double quote) in a string.Format(...) method as \x22 doesn't work as it comes out as \" in the result. i.e....
12
by: Jeff S | last post by:
In a VB.NET code behind module, I build a string for a link that points to a JavaScript function. The two lines of code below show what is relevant. PopupLink = "javascript:PopUpWindow(" &...
6
by: HK guy | last post by:
In C#, it has a escape chatacter @ then can ingnore all the escape charactrer in string, how about in VB.NET, any escape character like @? Thank you
15
by: pkaeowic | last post by:
I am having a problem with the "escape" character \e. This code is in my Windows form KeyPress event. The compiler gives me "unrecognized escape sequence" even though this is documented in MSDN....
1
by: Bostonian | last post by:
Hello, In an XML How do i replace the escape character "\" with "" ? I tried few differently things in C# like Replace, nothing seems to work. Example : <Veh id=\"Vehicle-01\" > I want to...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.