admin on September 8th, 2008

During development, while you run the application as a console application or windows form application, often the code needs to load a specific file within the same folder of the exe assembly resides. The file can be located by using the file name directory since the default location will be the exe’s directory.
For instance,

File.Exists("myfile.xml");

However, it is a different story if you run the application as a WindowsService. In order to resolve the excuting assembly directory path, the code needs to do a bit extra work.

Console.WriteLine(Assembly.GetExecutingAssembly().Location) ;

result: “C:\FolderName\RunMe.exe”

Console.WriteLine(    Path.GetDirectoryName( Assembly.GetExecutingAssembly().Location ) );

result: “C:\FolderName”

So , load the specifc file “myfile.xml”

File.ReadAllText(    Path.GetDirectoryName(              Assembly.GetExecutingAssembly().Location  + @"\myfile.xml" ));

Tags: , , ,

admin on September 3rd, 2008

Operating System: Windows Vista Enterprise 32 bit
CPU: Intel Pentium(R) 4 CPU 3.00GHz
Memory: 2038 MB
Tools: Testing Javascript Page

Opera 9.24 Score: 82

It is not too bad.


opera width="319" height="371" />


Firefox 3 Score : 109

It is fairly fast!

firefox width="295" height="412" />

Chrome beta Score : 1105
WOW, ten times faster than firefox,

I am glad I downloaded it. Well done Google!

chrome width="336" height="422" />

Internet Explorer 7 Score : ??????
After running ten seconds of browsing the page, I got err..

ie promt width="628" height="508" />

Here we go, continue. The score is 19

ie 7 width="421" height="470" />

Happy Browsing!

Tags: , , ,