How to get Assembly path in .NET Compact Framework? (C#)

by Vitaly Zayko 26. October 2008 19:18

It's not that easy as in WinForms:

 public string GetAssemblyPath()
 {
     return System.IO.Path.GetDirectoryName(
         System.Reflection.Assembly.GetExecutingAssembly().GetName().CodeBase);
 }

Note: last back slash doesn't add!

Digg It!DZone It!StumbleUponTechnoratiRedditDel.icio.usNewsVineFurlBlinkList

Tags:

Code Snippets

Comments

10/27/2008 4:13:22 AM #

trackback

Trackback from Vitaly in the Net

Do you know that you can use system variable "|DataDirectory|" to connect to your local SQL database?

Vitaly in the Net

Comments are closed

Calendar

<<  September 2010  >>
MoTuWeThFrSaSu
303112345
6789101112
13141516171819
20212223242526
27282930123
45678910

View posts in large calendar

About the author

Vitaly Zayko

Senior Software Developer / Team Lead / Product Manager

Moscow, Russia