I've posted the following question on Stack Overflow:
Can you recommend a .cvsignore file for a Visual C#.NET solution?
Showing posts with label C#. Show all posts
Showing posts with label C#. Show all posts
Sunday, September 28, 2008
Friday, September 19, 2008
How to encode double quotes and newlines inside a C# string
It turns out that this is not as easy as it seems. The syntax is kludgy. I found the answer on Gus Perez's blog
Imagine that you want this literal string in your C# code:
Then you have to code this in C# as:
Ugh!
Imagine that you want this literal string in your C# code:
<GC xmlns:dt="urn:schemas-microsoft-com:datatypes">
<pInLotIDs x:dt="list">
<item dt:dt="string">108P091G-000</item>
</pInLotIDs>
</GC>
Then you have to code this in C# as:
string sInputData = @"
<GC xmlns:dt=""urn:schemas-microsoft-com:datatypes"">
<pInLotIDs CSIM:dt=""list"">
<item dt:dt=""string"">108P091G-000</item>
</pInLotIDs>
</GC>
Ugh!
Subscribe to:
Posts (Atom)