<?xml version='1.0' encoding='UTF-8'?><?xml-stylesheet href="http://www.blogger.com/styles/atom.css" type="text/css"?><feed xmlns='http://www.w3.org/2005/Atom' xmlns:openSearch='http://a9.com/-/spec/opensearchrss/1.0/' xmlns:georss='http://www.georss.org/georss' xmlns:gd='http://schemas.google.com/g/2005' xmlns:thr='http://purl.org/syndication/thread/1.0'><id>tag:blogger.com,1999:blog-8364438250427466478</id><updated>2011-11-14T16:07:14.025-06:00</updated><category term='string'/><category term='C#'/><category term='xml'/><category term='cvs'/><category term='escape'/><category term='ntfs'/><category term='html'/><category term='mount point'/><category term='visual web developer'/><category term='truecrypt'/><category term='line break'/><category term='asp.net'/><category term='.net'/><category term='newline'/><category term='openid stackoverflow'/><category term='double quotes'/><category term='vista'/><category term='intelliparse'/><title type='text'>Mishandled Exception</title><subtitle type='html'>A blog about programming and other unexceptional things</subtitle><link rel='http://schemas.google.com/g/2005#feed' type='application/atom+xml' href='http://mishandledexception.blogspot.com/feeds/posts/default'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default?max-results=100'/><link rel='alternate' type='text/html' href='http://mishandledexception.blogspot.com/'/><link rel='hub' href='http://pubsubhubbub.appspot.com/'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/08756365895376866071</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><generator version='7.00' uri='http://www.blogger.com'>Blogger</generator><openSearch:totalResults>9</openSearch:totalResults><openSearch:startIndex>1</openSearch:startIndex><openSearch:itemsPerPage>100</openSearch:itemsPerPage><entry><id>tag:blogger.com,1999:blog-8364438250427466478.post-214152346052230880</id><published>2010-11-09T11:27:00.003-06:00</published><updated>2010-11-09T11:31:38.412-06:00</updated><title type='text'>Stack Overflow rocks!</title><content type='html'>I've been using &lt;a href="http://stackoverflow.com"&gt;Stack Overflow&lt;/a&gt; for a couple of years now.  In my opinion, this is the single best site to search for answers to technical or programming questions.  Highly recommended!  I post there as user &lt;a href="http://stackoverflow.com/users/18542/kevin-p"&gt;kevin-p&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;If you haven't heard of Stack Overflow, its &lt;a href="http://en.wikipedia.org/wiki/Stack_Overflow"&gt;Wikipedia article&lt;/a&gt; provides a good overview of how it works.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8364438250427466478-214152346052230880?l=mishandledexception.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mishandledexception.blogspot.com/feeds/214152346052230880/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8364438250427466478&amp;postID=214152346052230880' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/214152346052230880'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/214152346052230880'/><link rel='alternate' type='text/html' href='http://mishandledexception.blogspot.com/2010/11/stack-overflow-rocks.html' title='Stack Overflow rocks!'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/08756365895376866071</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8364438250427466478.post-8572645330783270751</id><published>2009-08-20T15:46:00.004-05:00</published><updated>2009-08-20T15:53:34.487-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='mount point'/><category scheme='http://www.blogger.com/atom/ns#' term='ntfs'/><category scheme='http://www.blogger.com/atom/ns#' term='vista'/><category scheme='http://www.blogger.com/atom/ns#' term='truecrypt'/><title type='text'>Windows Vista: Creating an NTFS mount point folder for a TrueCrypt volume</title><content type='html'>This is a &lt;a href="http://forums.truecrypt.org/viewtopic.php?p=72418#72418"&gt;forum post that I made on the TrueCrypt forums&lt;/a&gt;.&lt;br /&gt;&lt;br /&gt;I wanted to mount a TrueCrypt volume as a Windows NTFS folder using an NTFS mount point.  I spent a lot of time figuring out how to do this, so here are the instructions for anyone else who wants to do this.&lt;br /&gt;&lt;br /&gt;This is tested on Windows Vista.  Use on other versions at your own risk.&lt;br /&gt;&lt;br /&gt;Goal: Mount a TrueCrypt volume as an NTFS folder, e.g. C:\Users\MyName\MyEncryptedFolder&lt;br /&gt;&lt;br /&gt;1)  Create a TrueCrypt volume as documented in the manual.  I believe that this needs to be an NTFS volume, but I have not verified this.&lt;br /&gt;&lt;br /&gt;2)  Mount the TrueCrypt volume as a drive letter, e.g. Z:  Important:  Windows Vista wants you to re-use this same drive letter in the future, so choose it carefully.&lt;br /&gt;&lt;br /&gt;3)  Verify that Z: was mounted correctly and you can see the files inside.&lt;br /&gt;&lt;br /&gt;4)  Create an empty folder named MyEncryptedFolder in C:\Users\MyName\  This has to be on an NTFS device or partition.  This folder must be empty.&lt;br /&gt;&lt;br /&gt;5)  Open a Command Prompt window in Administrator Mode.  *** Important: Click on Start, find the Command Prompt, right-click on it, select Run as Administrator.  If this works properly, you should have a new Command Prompt window named Administrator: Command Prompt ***&lt;br /&gt;&lt;br /&gt;6) In this window, type the command: mountvol.exe  You should see your TrueCrypt drive letter below in the form:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;    \\?\Volume{0384767c-8db8-11de-b19b-00247e518e40}\&lt;br /&gt;        Z:\&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Copy the volume ID above including the slashes into the clipboard.  You will use this shortly.&lt;br /&gt;&lt;br /&gt;7) Type the command:&lt;br /&gt;&lt;blockquote&gt;mountvol.exe C:\Users\MyName\MyEncryptedFolder \\?\Volume{0384767c-8db8-11de-b19b-00247e518e40}\&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;(Substitute your path and volume IDs as needed).&lt;br /&gt;&lt;br /&gt;That should be it!  You should now see MyEncryptedFolder with a slightly different icon and the contents of your TrueCrypt volume inside it.&lt;br /&gt;&lt;br /&gt;Notes:&lt;br /&gt;&lt;br /&gt;a) If you dismount the TrueCrypt volume, and try to browse the MyEncryptedFolder, you will get a generic message that this folder "refers to a location that is unavailable".  Simply mount your TrueCrypt volume again, and everything will start working properly once more.&lt;br /&gt;&lt;br /&gt;b) The folder mount point seems to be tied to the drive letter for some reason, so if you change the drive letter, you will have to delete and recreate the mount point.  See mountvol.exe for instructions on how to do this.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8364438250427466478-8572645330783270751?l=mishandledexception.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mishandledexception.blogspot.com/feeds/8572645330783270751/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8364438250427466478&amp;postID=8572645330783270751' title='3 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/8572645330783270751'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/8572645330783270751'/><link rel='alternate' type='text/html' href='http://mishandledexception.blogspot.com/2009/08/windows-vista-creating-ntfs-mount-point.html' title='Windows Vista: Creating an NTFS mount point folder for a TrueCrypt volume'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/08756365895376866071</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>3</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8364438250427466478.post-1305175780307215760</id><published>2009-04-14T21:46:00.002-05:00</published><updated>2009-04-14T21:51:14.870-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='intelliparse'/><title type='text'>IntelliParse</title><content type='html'>I've started my first SourceForge project named &lt;a href="https://sourceforge.net/projects/intelliparse/"&gt;IntelliParse&lt;/a&gt;.  As the description goes, this is...&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;A library to parse user-entered form data such as telephone numbers, social security numbers, dates, etc. and intelligently convert them to usable and normalized forms, with country codes, area codes, etc.&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;I intend for this library to be a cross platform and available on all modern operating systems for the desktop, laptop and smartphone.  I'm in the process of deciding on a directory structure, and its taking shape with the answers to this &lt;a href="http://stackoverflow.com/questions/718126/best-folder-structure-for-c-cross-platform-library-and-bindings"&gt;StackOverflow question&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;/project                    //Top level folder&lt;br /&gt;&lt;br /&gt;        /bin                //Binaries ready for deployment&lt;br /&gt;            /linux_amd64    //Linux AMD64 platform&lt;br /&gt;                  /debug    //Debug build - duplicated in all platforms&lt;br /&gt;                  /release  //Release build - duplicated in all platforms&lt;br /&gt;            /linux_i386     //Linux 32-bit platform&lt;br /&gt;            /macosx         //Mac OS X&lt;br /&gt;            /win32          //Windows 32-bit platform&lt;br /&gt;                  /cygwin   //Windows 32-bit platform compiled with Cygwin&lt;br /&gt;                  /vs.net   //Windows 32-bit platform compiled with Visual Studio .NET&lt;br /&gt;            /win64          //Windows 64-bit platform&lt;br /&gt;&lt;br /&gt;        /build              //Make and build files, IDE project files&lt;br /&gt;            /linux_amd64    //Linux AMD64 platform&lt;br /&gt;            /linux_i386     //Linux 32-bit platform&lt;br /&gt;            /macosx         //Mac OS X&lt;br /&gt;            /win32          //Windows 32-bit platform&lt;br /&gt;            /win64          //Windows 64-bit platform&lt;br /&gt;&lt;br /&gt;        /config             //Configuration files that accompany the binaries&lt;br /&gt;&lt;br /&gt;        /data               //Data files that accompany the binaries&lt;br /&gt;&lt;br /&gt;        /doc                //Documentation&lt;br /&gt;&lt;br /&gt;        /lib                //External or third-party libraries&lt;br /&gt;            /platforms      //Platform-specific code for ...&lt;br /&gt;                      /linux_amd64    //Linux AMD64 platform&lt;br /&gt;                      /linux_i386     //Linux 32-bit platform&lt;br /&gt;                      /macosx         //Mac OS X&lt;br /&gt;                      /win32          //Windows 32-bit platform&lt;br /&gt;                      /win64          //Windows 64-bit platform&lt;br /&gt;            /src            //Available library source code in subfolders&lt;br /&gt;&lt;br /&gt;        /src                //Source code tree - this will contain main.cpp&lt;br /&gt;            /bindings       //Bindings to other languages such as ...&lt;br /&gt;                      /python&lt;br /&gt;                      /java&lt;br /&gt;            /h              //Header files&lt;br /&gt;            /modules        //Platform-independent modules, components or subprojects&lt;br /&gt;            /platforms      //Platform-specific code for ...&lt;br /&gt;                      /linux_amd64 //Linux AMD64 platform-specific code&lt;br /&gt;                      /linux_i386  //Linux 32-bit platform-specific code&lt;br /&gt;                      /macosx&lt;br /&gt;                      /win32       //Windows 32-bit platform-specific code&lt;br /&gt;                      /win64       //Windows 64-bit platform&lt;br /&gt;&lt;br /&gt;        /test               //Automated test scripts&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;I am planning on using CMake and Subversion.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8364438250427466478-1305175780307215760?l=mishandledexception.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mishandledexception.blogspot.com/feeds/1305175780307215760/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8364438250427466478&amp;postID=1305175780307215760' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/1305175780307215760'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/1305175780307215760'/><link rel='alternate' type='text/html' href='http://mishandledexception.blogspot.com/2009/04/intelliparse.html' title='IntelliParse'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/08756365895376866071</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8364438250427466478.post-6336714464905625515</id><published>2008-11-06T23:03:00.004-06:00</published><updated>2008-11-06T23:45:29.110-06:00</updated><title type='text'>Quick and dirty connection to Oracle using ADO.NET</title><content type='html'>My C#.NET application needs to read from an Oracle database.  There are many elaborate ways to connect to a database in .NET, including the Linq for Entities ORM.  However, this was way too much for my purpose.  I've found the following code to be much simpler.  It's largely copied from a &lt;a href="http://www.csharp-station.com/Tutorials/AdoDotNet/Lesson02.aspx"&gt;C# Station&lt;/a&gt; post.  The key difference is that you have to use the OracleClient class.&lt;br /&gt;&lt;br /&gt;First:  Make sure that your project has a reference to System.Data.OracleClient&lt;br /&gt;&lt;br /&gt;&lt;pre&gt;&lt;br /&gt;           string connectionString = @"&lt;br /&gt;SERVER=(DESCRIPTION=(ADDRESS=(PROTOCOL=TCP&lt;br /&gt;(HOST=OracleHost)(PORT=OraclePort))&lt;br /&gt;(CONNECT_DATA=(SERVICE_NAME=OracleServiceName)))&lt;br /&gt;;uid=UserID;pwd=Password;";&lt;br /&gt;&lt;br /&gt;           OracleConnection conn = new&lt;br /&gt;             OracleConnection(connectionString);&lt;br /&gt;&lt;br /&gt;           OracleDataReader rdr = null;&lt;br /&gt;&lt;br /&gt;           try&lt;br /&gt;           {&lt;br /&gt;               // 2. Open the connection&lt;br /&gt;               conn.Open();&lt;br /&gt;&lt;br /&gt;               // 3. Pass the connection to a command object&lt;br /&gt;               OracleCommand cmd = new OracleCommand(&lt;br /&gt;                   "select * from mytable", conn);&lt;br /&gt;&lt;br /&gt;               //&lt;br /&gt;               // 4. Use the connection&lt;br /&gt;               //&lt;br /&gt;&lt;br /&gt;               // get query results&lt;br /&gt;               rdr = cmd.ExecuteReader();&lt;br /&gt;&lt;br /&gt;               // print each record&lt;br /&gt;               while (rdr.Read())&lt;br /&gt;               {&lt;br /&gt;                   for ( int i = 0;&lt;br /&gt;                     i &amp;lt;rdr.FieldCount; i++)    &lt;br /&gt;                        Console.WriteLine(rdr[i]);&lt;br /&gt;                         // Print each field&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;            }&lt;br /&gt;            catch&lt;br /&gt;            {&lt;br /&gt;                throw;&lt;br /&gt;            }&lt;br /&gt;            finally&lt;br /&gt;            {&lt;br /&gt;                // close the reader&lt;br /&gt;                if (rdr != null)&lt;br /&gt;                {&lt;br /&gt;                    rdr.Close();&lt;br /&gt;                }&lt;br /&gt;&lt;br /&gt;                // 5. Close the connection&lt;br /&gt;                if (conn != null)&lt;br /&gt;                {&lt;br /&gt;                    conn.Close();&lt;br /&gt;                }&lt;br /&gt;            }   // End of try-catch-finally&lt;br /&gt;&lt;/pre&gt;&lt;br /&gt;&lt;br /&gt;Thanks are also due to &lt;a href="http://www.connectionstrings.com/?carrier=oracle"&gt;ConnectionStrings.com&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8364438250427466478-6336714464905625515?l=mishandledexception.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mishandledexception.blogspot.com/feeds/6336714464905625515/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8364438250427466478&amp;postID=6336714464905625515' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/6336714464905625515'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/6336714464905625515'/><link rel='alternate' type='text/html' href='http://mishandledexception.blogspot.com/2008/11/quick-and-dirty-connection-to-oracle.html' title='Quick and dirty connection to Oracle using ADO.NET'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/08756365895376866071</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8364438250427466478.post-7853709419331719095</id><published>2008-09-28T22:59:00.002-05:00</published><updated>2008-09-28T23:02:28.377-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='.net'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='cvs'/><title type='text'>.cvsignore for a Visual Studio .NET solution</title><content type='html'>I've posted the following question on &lt;a href="http://stackoverflow.com"&gt;Stack Overflow&lt;/a&gt;:&lt;br /&gt;&lt;br /&gt;&lt;a href="http://stackoverflow.com/questions/147460/can-you-recommend-a-cvsignore-file-for-a-visual-cnet-solution"&gt;Can you recommend a .cvsignore file for a Visual C#.NET solution?&lt;/a&gt;&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8364438250427466478-7853709419331719095?l=mishandledexception.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mishandledexception.blogspot.com/feeds/7853709419331719095/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8364438250427466478&amp;postID=7853709419331719095' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/7853709419331719095'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/7853709419331719095'/><link rel='alternate' type='text/html' href='http://mishandledexception.blogspot.com/2008/09/cvsignore-for-visual-studio-net.html' title='.cvsignore for a Visual Studio .NET solution'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/08756365895376866071</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8364438250427466478.post-5684880584519240424</id><published>2008-09-19T04:49:00.002-05:00</published><updated>2008-09-19T04:54:53.953-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='escape'/><category scheme='http://www.blogger.com/atom/ns#' term='xml'/><category scheme='http://www.blogger.com/atom/ns#' term='html'/><title type='text'>Convert &lt; and &gt; to &amp; lt; and &amp; gt;</title><content type='html'>If you're trying to display HTML or XML tags on a web page, like in &lt;a href="http://mishandledexception.blogspot.com/2008/09/how-to-encode-double-quotes-and.html"&gt;my previous post&lt;/a&gt;, most web publishing systems will swallow up the tags and the output will not be what you expect.&lt;br /&gt;&lt;br /&gt;I came across this &lt;a href="http://www.stanford.edu/~bsuter/js/convert.html"&gt;nice web converter&lt;/a&gt; that converts the &amp;lt; to  &amp; lt; and the &amp;gt; to &amp; gt; allowing your content to remain unmangled.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8364438250427466478-5684880584519240424?l=mishandledexception.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mishandledexception.blogspot.com/feeds/5684880584519240424/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8364438250427466478&amp;postID=5684880584519240424' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/5684880584519240424'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/5684880584519240424'/><link rel='alternate' type='text/html' href='http://mishandledexception.blogspot.com/2008/09/convert-and-to-lt-and-gt.html' title='Convert &amp;lt; and &amp;gt; to &amp; lt; and &amp; gt;'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/08756365895376866071</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8364438250427466478.post-7309232602569810233</id><published>2008-09-19T00:00:00.003-05:00</published><updated>2008-09-19T04:49:34.003-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='line break'/><category scheme='http://www.blogger.com/atom/ns#' term='newline'/><category scheme='http://www.blogger.com/atom/ns#' term='C#'/><category scheme='http://www.blogger.com/atom/ns#' term='string'/><category scheme='http://www.blogger.com/atom/ns#' term='double quotes'/><title type='text'>How to encode double quotes and newlines inside a C# string</title><content type='html'>It turns out that this is not as easy as it seems.  The syntax is kludgy.  I found the answer on &lt;a href="http://blogs.msdn.com/gusperez/archive/2005/08/10/450257.aspx"&gt;Gus Perez's blog&lt;/a&gt;&lt;br /&gt;&lt;br /&gt;Imagine that you want this literal string in your C# code:&lt;br /&gt;&lt;blockquote&gt;&amp;lt;GC xmlns:dt="urn:schemas-microsoft-com:datatypes"&gt;&lt;br /&gt;            &amp;lt;pInLotIDs x:dt="list"&amp;gt;&lt;br /&gt;                &amp;lt;item dt:dt="string"&amp;gt;108P091G-000&amp;lt;/item&amp;gt;&lt;br /&gt;            &amp;lt;/pInLotIDs&amp;gt;&lt;br /&gt;&amp;lt;/GC&amp;gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Then you have to code this in C# as:&lt;br /&gt;&lt;br /&gt;&lt;blockquote&gt;&lt;br /&gt;string sInputData = @"&lt;br /&gt;&amp;lt;GC xmlns:dt=""urn:schemas-microsoft-com:datatypes""&amp;gt;&lt;br /&gt;            &amp;lt;pInLotIDs CSIM:dt=""list""&amp;gt;&lt;br /&gt;                &amp;lt;item dt:dt=""string""&amp;gt;108P091G-000&amp;lt;/item&amp;gt;&lt;br /&gt;            &amp;lt;/pInLotIDs&amp;gt;&lt;br /&gt;&amp;lt;/GC&amp;gt;&lt;br /&gt;&lt;/blockquote&gt;&lt;br /&gt;&lt;br /&gt;Ugh!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8364438250427466478-7309232602569810233?l=mishandledexception.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mishandledexception.blogspot.com/feeds/7309232602569810233/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8364438250427466478&amp;postID=7309232602569810233' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/7309232602569810233'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/7309232602569810233'/><link rel='alternate' type='text/html' href='http://mishandledexception.blogspot.com/2008/09/how-to-encode-double-quotes-and.html' title='How to encode double quotes and newlines inside a C# string'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/08756365895376866071</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8364438250427466478.post-5983238437661381032</id><published>2008-09-16T08:58:00.004-05:00</published><updated>2008-09-16T09:02:42.437-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='asp.net'/><category scheme='http://www.blogger.com/atom/ns#' term='visual web developer'/><title type='text'>ASP.NET tutorials</title><content type='html'>I have been learning ASP.NET using Visual Web Developer 2008 Express Edition.  Along the way, I came across &lt;a href="http://www.dotnetspider.com/tutorials/AspNet-Tutorials.aspx"&gt;this structured set of ASP.NET tutorials&lt;/a&gt; at DotNetSpider.  I want to give them a plug - although the tutorials could be polished some, they are very easy to follow and build up slowly on a good fundamental base.  I am halfway through them right now.&lt;br /&gt;&lt;br /&gt;I also like &lt;a href="http://www.microsoft.com/express/vwd/"&gt;Visual Web Developer 2008 Express Edition&lt;/a&gt; - it is free to download, use and distribute applications.&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8364438250427466478-5983238437661381032?l=mishandledexception.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='replies' type='application/atom+xml' href='http://mishandledexception.blogspot.com/feeds/5983238437661381032/comments/default' title='Post Comments'/><link rel='replies' type='text/html' href='http://www.blogger.com/comment.g?blogID=8364438250427466478&amp;postID=5983238437661381032' title='0 Comments'/><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/5983238437661381032'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/5983238437661381032'/><link rel='alternate' type='text/html' href='http://mishandledexception.blogspot.com/2008/09/aspnet-tutorials.html' title='ASP.NET tutorials'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/08756365895376866071</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author><thr:total>0</thr:total></entry><entry><id>tag:blogger.com,1999:blog-8364438250427466478.post-2791297106622136766</id><published>2008-09-16T08:42:00.000-05:00</published><updated>2008-09-16T08:45:02.201-05:00</updated><category scheme='http://www.blogger.com/atom/ns#' term='openid stackoverflow'/><title type='text'>My first blog post</title><content type='html'>I've really created this blog so that I can get an &lt;a href="http://en.wikipedia.org/wiki/OpenID"&gt;OpenID&lt;/a&gt;.  This will allow me to log in to a promising new web site for programmers called &lt;a href="http://stackoverflow.com"&gt;StackOverflow&lt;/a&gt;.  Check them out!&lt;div class="blogger-post-footer"&gt;&lt;img width='1' height='1' src='https://blogger.googleusercontent.com/tracker/8364438250427466478-2791297106622136766?l=mishandledexception.blogspot.com' alt='' /&gt;&lt;/div&gt;</content><link rel='edit' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/2791297106622136766'/><link rel='self' type='application/atom+xml' href='http://www.blogger.com/feeds/8364438250427466478/posts/default/2791297106622136766'/><link rel='alternate' type='text/html' href='http://mishandledexception.blogspot.com/2008/09/my-first-blog-post.html' title='My first blog post'/><author><name>Kevin</name><uri>http://www.blogger.com/profile/08756365895376866071</uri><email>noreply@blogger.com</email><gd:image rel='http://schemas.google.com/g/2005#thumbnail' width='16' height='16' src='http://img2.blogblog.com/img/b16-rounded.gif'/></author></entry></feed>
