c#


Finding physical path in C# .net


#"F:\LEAFPRODUCT\Bin\Service.exe"
This is the physical path of Service.exe, let me know is there any other alternate way or any general way to find the physical path of WrmService.exe in window application.
In a web application we can use Server.MapPath like that. Here I need to reduce path means
label1.Text = AssemblyName.GetAssemblyName(#"F:\LEAFPRODUCT\Bin\Service.exe").Version.ToString();
This is my coding I need to reduce the physical path here, means I don't want to put all the folders I need this way only
label1.Text = AssemblyName.GetAssemblyName("WrmService.exe").Version.ToString();
means only the required file name here means WrmService.exe
System.IO.Path.GetFullPath() is similar as Server.MapPath()
You can give it a relative location, and it will give you the full location based on the directory that the assembly is in.
Are you looking for something like this?
C#: How do I get the path of the assembly the code is in?
You want the physical path of the executable assembly?
System.Reflection.Assembly.GetEntryAssembly().Location

Related Links

Can Linq to XML work with colons?
How do I determine the maximum number of excel sheets possible to create in a C# program?
asp.net email SmtpMail.SmtpServer.Insert(0, “”);
Multiplexing interface method calls into a single delegate and demultiplexing
How can I convert XLSX to DOCX programmatically
silverlight application merging with aspx project . not updating?
I want to refresh treeview with new value
lambda expression for Enumerable.Select
Force (BinaryFormatter) serializer to use SerializableAttribute semantics when ISerializable?
C# .NET 3.5 Loading assembly from network share
How to effectively save database table names in XML and parse them in C#
Using a loop when sending a Postmark message
create a binding from a DataListView to a list consisting of a list
Convert EPS to JPG on upload using C# and ImageMagick
WCF Service calling WCF Service - Where to put client service reference?
Match a hash created in C# with sql

Categories

HOME
actionscript-3
internet-explorer
http
swift3
arcgis
azure-database-mysql
download
ebay
ms-access-2010
checkpoint
procmon
clip-path
websharper
jsfiddle
game-engine
serenity-js
struts
traveling-salesman
gulp-jshint
marionette
meteor-accounts
selenium3
blockly
android-geofence
pyenv
matrix-multiplication
libconfig
icu
logan-square
weld
history
bioperl
aws-rds
dmalloc
grib
blitz3d
turbolinks
mongodb-3.3
jira-agile
bytearray
php-java-bridge
laterjs
periodic-processing
skbio
methodology
nslocalizedstring
askbot
markerspiderfier
encode
producer-consumer
mojolicious
page-flipping
autoscaling
android-filterable
joomla3.3
euro
cakephp-2.6
esb-toolkit-2.1
dirname
cocos2d-x-2.x
pnunit
ccmenuitem
disabled-control
xpand
git-subtree
acrofields
kuka-krl
netbeans-plugins
randomaccessfile
octokit
gwt2
gpl
netzke
waveout
android-memory
event-propagation
github-archive
backlight
jquery-click-event
youtube.net-api
onunload
datarelation
hp-trim
appointment
authkit

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App