<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom" xmlns:content="http://purl.org/rss/1.0/modules/content/"><channel><title>.NET on Lin's Blog</title><link>https://coder.tw/en/tags/.net/</link><description>Recent content in .NET on Lin's Blog</description><generator>Hugo</generator><language>en-US</language><lastBuildDate>Tue, 26 Jul 2011 12:17:23 +0000</lastBuildDate><atom:link href="https://coder.tw/en/tags/.net/index.xml" rel="self" type="application/rss+xml"/><item><title>How to Compute an MD5 Hash in VB.NET (System.Security.Cryptography)</title><link>https://coder.tw/en/posts/vb-net-md5-system-security-cryptography/</link><pubDate>Tue, 26 Jul 2011 12:17:23 +0000</pubDate><guid>https://coder.tw/en/posts/vb-net-md5-system-security-cryptography/</guid><description>&lt;p&gt;Recently I was writing a password generator and needed to compute an MD5 hash. In PHP I can just call md5() to get an MD5 hash, but I had never actually tried MD5 in VB. I was worried that .NET might not have any MD5 support, in which case I would have to write it myself&amp;hellip;. Orz. Luckily, when I checked MSDN, it turned out to be there. The process was a bit of a hassle, but fortunately MSDN provides a getMD5hash function, so I simply reused it.&lt;/p&gt;</description></item><item><title>Does Your Program Need to Run as Administrator? Make a .NET Program Run as Administrator by Default~</title><link>https://coder.tw/en/posts/net-program-run-as-administrator-2/</link><pubDate>Wed, 16 Feb 2011 00:03:57 +0000</pubDate><guid>https://coder.tw/en/posts/net-program-run-as-administrator-2/</guid><description>&lt;p&gt;Sometimes when you develop a program in Visual Studio, it may need administrator privileges, for example to access system folders or to use certain high-level WinAPIs. On Windows XP, using administrator privileges is not a big deal. But if you want your program to run on Windows 7 or Vista, you have to grant the program administrator rights, or it will run into problems halfway through. Generally, you can ask users to right-click the program and select &amp;ldquo;Run as administrator,&amp;rdquo; but that feels odd, because users would have to set it up themselves. Actually, there is another way to make your program run as administrator by default, so users don&amp;rsquo;t need to configure anything.&lt;/p&gt;</description></item><item><title>How to Read Windows Environment Variables (System Variables) in a .NET Program - VB.NET Example</title><link>https://coder.tw/en/posts/net-windows-environment-variables-vb-net/</link><pubDate>Fri, 11 Feb 2011 09:55:35 +0000</pubDate><guid>https://coder.tw/en/posts/net-windows-environment-variables-vb-net/</guid><description>&lt;p style="text-align: center;"&gt;&lt;a href="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2011/02/2010-11-07_144258.jpg"&gt;&lt;img class="alignnone size-full wp-image-165" title="2010-11-07_144258" src="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2011/02/2010-11-07_144258.jpg" alt="" width="394" height="406" /&gt;&lt;/a&gt;&lt;/p&gt;
Anyone who has written CMD knows about environment variables. They let you easily get information that differs from one computer to another, such as the user name. In CMD, using an environment variable is simple: you just write it in the %environment variable name% format. In a .NET program, though, it isn't that simple. You need to use the Environ function.
&lt;h2&gt;</description></item><item><title>Visual Studio 2010 - Developing with .NET Famework 4, Better Parallel Computing, and Automated UI Testing</title><link>https://coder.tw/en/posts/visual-studio-2010-net-framework-4-2/</link><pubDate>Mon, 13 Dec 2010 17:56:39 +0000</pubDate><guid>https://coder.tw/en/posts/visual-studio-2010-net-framework-4-2/</guid><description>&lt;p style="text-align: center;"&gt;&lt;a href="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2010/12/2010-12-10_224908.jpg"&gt;&lt;img class="size-large wp-image-4164 aligncenter" title="2010-12-10_224908" src="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2010/12/2010-12-10_224908-520x314.jpg" alt="" width="520" height="314" /&gt;&lt;/a&gt;&lt;/p&gt;
I never used Visual Studio 2010, which came out in May 2010, until a few days ago. When I was installing Visual Studio on Windows 7, the installation disc I had was 32-bit and wouldn't install, so I downloaded Visual Studio 2010 Express instead. I originally thought Visual Studio 2010 wasn't much different from Visual Studio 2008, but after installing it I found out I was wrong. The executables it compiles are noticeably faster. That's because all of the controls in Visual Studio 2010 are built with .NET Famework 4, so they run faster. Visual Studio 2010 also upgrades (adds) many things, such as heterogeneous platform development management, DataTips, and parallel computing.</description></item><item><title>[VB.Net] Get File Paths of a Specific Format in a Folder and Store Them in an ArrayList (Easily Adapted to Other .NET Languages)</title><link>https://coder.tw/en/posts/vb-net-get-folder-file-paths-arraylist-2/</link><pubDate>Sun, 07 Nov 2010 15:45:56 +0000</pubDate><guid>https://coder.tw/en/posts/vb-net-get-folder-file-paths-arraylist-2/</guid><description>&lt;p style="text-align: center;"&gt;&lt;a href="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2010/11/2010-11-07_154306.jpg"&gt;&lt;img class="size-large wp-image-3957 aligncenter" title="2010-11-07_154306" src="https://pub-6c026d2742d14927bfa2d850c31eac91.r2.dev/wp-content/uploads/2010/11/2010-11-07_154306-520x311.jpg" alt="" width="520" height="311" /&gt;&lt;/a&gt;&lt;/p&gt;
Last time, while I was working on the entertainment feature of the new version of Desktop Locker, I needed to automatically get all the music files in its Resources folder. That led me to work out the code below, which collects the file paths of a specific format in a folder into an ArrayList. For example, if you want all the mp3 files in a music folder, you can use this code to do it.</description></item></channel></rss>