<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blogs.msdn.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Anthony Wong's Blog : General</title><link>http://blogs.msdn.com/anthonywong/archive/tags/General/default.aspx</link><description>Tags: General</description><dc:language>en-US</dc:language><generator>CommunityServer 2.1 SP1 (Build: 61025.2)</generator><item><title>How do I determine the application's root directory?</title><link>http://blogs.msdn.com/anthonywong/archive/2007/01/22/how-do-i-determine-the-application-s-root-directory.aspx</link><pubDate>Mon, 22 Jan 2007 23:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:1509605</guid><dc:creator>antwong</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/anthonywong/comments/1509605.aspx</comments><wfw:commentRss>http://blogs.msdn.com/anthonywong/commentrss.aspx?PostID=1509605</wfw:commentRss><description>&lt;SPAN&gt;
&lt;P&gt;&lt;A title="aa497276.javascript:ShowHide('Avl3fsjij');"&gt;&lt;U&gt;&lt;FONT color=#0000ff&gt;&lt;/FONT&gt;&lt;/U&gt;&lt;/A&gt;&lt;/P&gt;
&lt;DIV id=Avl3fsjij&gt;
&lt;P&gt;This is a&amp;nbsp;popular question in the forum. The answer used be&amp;nbsp;part of NETCF FAQ but&amp;nbsp;cannot be easily located these days, so I would include the&amp;nbsp;information here:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;An application can determine the directory from which it was run by utilizing Reflection and easily modify it using IO.Path namespace.&lt;/P&gt;
&lt;P&gt;[C#]&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;using System.Reflection;&lt;BR&gt;using System.IO;&lt;BR&gt;&lt;BR&gt;// This is the full directory and exe name&lt;BR&gt;String fullAppName = Assembly.GetExecutingAssembly().GetName().CodeBase;&lt;BR&gt;&lt;BR&gt;// This strips off the exe name&lt;BR&gt;String fullAppPath = Path.GetDirectoryName(fullAppName);&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;// This adds a file name to the path&lt;BR&gt;String fullFileName = Path.Combine(fullAppPath, "myfile.txt");&lt;BR&gt;&lt;/P&gt;&lt;/CODE&gt;
&lt;P&gt;&lt;CODE&gt;From &lt;A title=http://msdn2.microsoft.com/en-us/library/aa497276.aspx href="http://msdn2.microsoft.com/en-us/library/aa497276.aspx" mce_href="http://msdn2.microsoft.com/en-us/library/aa497276.aspx"&gt;http://msdn2.microsoft.com/en-us/library/aa497276.aspx&lt;/A&gt;&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;Cheers,&lt;/CODE&gt;&lt;/P&gt;
&lt;P&gt;&lt;CODE&gt;Anthony Wong [MSFT]&lt;/CODE&gt;&lt;/P&gt;&lt;/DIV&gt;&lt;/SPAN&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=1509605" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/anthonywong/archive/tags/General/default.aspx">General</category></item><item><title>First Blog</title><link>http://blogs.msdn.com/anthonywong/archive/2005/04/20/410081.aspx</link><pubDate>Wed, 20 Apr 2005 12:31:00 GMT</pubDate><guid isPermaLink="false">91d46819-8472-40ad-a661-2c78acb4018c:410081</guid><dc:creator>antwong</dc:creator><slash:comments>0</slash:comments><comments>http://blogs.msdn.com/anthonywong/comments/410081.aspx</comments><wfw:commentRss>http://blogs.msdn.com/anthonywong/commentrss.aspx?PostID=410081</wfw:commentRss><description>&lt;P&gt;&lt;FONT style="BACKGROUND-COLOR: #ffffff" face=Arial color=#000000&gt;Hello everyone. Thank you for visiting my blog.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;My name is Anthony Wong. I am working for the .NET Compact Framework group at Microsoft in Redmond, WA. My job duties include quality assurance for the PMEs in core networking (System.Net), GUI (System.Windows.Forms and System.Drawing) and BCL. &lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;Let me give a little background about myself. I was born and raised in Hong Kong, and attended university at UCLA before I came to the Washington state. During the time I am not at work, I enjoy reading, skiing, and hanging out with friends. Seattle is a beautiful city, and although it rains a lot more often here than in LA, I realize this is necessary so that we can enjoy the green trees and flowers here.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;&lt;FONT face=Arial&gt;It is my hope that this blog will provide the developer community with useful information to facilitate the use of .NET Compact Framework.&lt;/FONT&gt;&lt;/P&gt;
&lt;P&gt;This posting is provided "AS IS" with no warranties, and confers no rights. &lt;/P&gt;&lt;img src="http://blogs.msdn.com/aggbug.aspx?PostID=410081" width="1" height="1"&gt;</description><category domain="http://blogs.msdn.com/anthonywong/archive/tags/General/default.aspx">General</category></item></channel></rss>