Yes, but in the situation I was working under I had to use the double quote, but not as a delimiter but as an actual character. I was pulling the embedded link off a youtube page behind the scenes and then sending the link over as the target URL in a Windows Media Player ActiveX container. If the quotes weren't in the string, the WMP wouldn't open the link. This is really why I had to jump through so many hoops to figure it out. C#'s string literal '@' was the only way I could approach it, as the other normal delimiters didn't translate successfully when dropped into the WMP target URL. It's certainly an oddball approach, but my knowledge of C# isn't deep enough to have known another way to approach it, so I got creative/lucky and came up with this.
David Smith Systems Administrator Doan Family of Dealerships (585) 352-6600 ext.1730 [EMAIL PROTECTED] -----Original Message----- From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of MB Software Solutions General Account Sent: Tuesday, June 24, 2008 10:45 AM To: [EMAIL PROTECTED] Subject: Re: [NF] C# tip of the day David Smith wrote: > . on the off chance some of you may be working with C#, I thought I'd > toss in this nugget. As far as I could find, it is not out there on > Google anywhere. Ready? Here goes: > > > > You have this string: string MyString = @"<src=http:www.mywebsite.com>" > > You need to add a double quotation marks in the middle and end of it, > so it ends up like this: @"<src="http://www.mywebsite.com">" > > > > What I discovered was the usual string literal 'tricks' didn't work ( > /" , "", and so on ). So after three days of poking at it with sticks, > I came up with this: > > > > String doublequotes = @"""" ; yep, four doublequotes gets interprested as > a single double quote by the compiler. who knew? I sure didn't J So > then by splitting up the string I ended up with this: > > String mystring1 = @"<src"; > > String mystring2 = @"http://www.mysite.com"; > > String mystring3 = @">"; > > String myfullstring = mystring1 + doublequotes + mystring2 + > doublequotes + mystring3; > > > > . which gives the output <src="http://www.mywebsite.com"> > > > > Hopefully this will come in handy for you at some point. Can you use some other character for delimiting strings than double quotes, for example like in Fox where you can use [ and ] brackets? [excessive quoting removed by server] _______________________________________________ Post Messages to: ProFox@leafe.com Subscription Maintenance: http://leafe.com/mailman/listinfo/profox OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech Searchable Archive: http://leafe.com/archives/search/profox This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED] ** All postings, unless explicitly stated otherwise, are the opinions of the author, and do not constitute legal or medical advice. This statement is added to the messages for those lawyers who are too stupid to see the obvious.