c# .dat file assign to variable -


how can assign a variable, located @ same project, example @ project created folder named app_data , example file file.dat , how can assign file @ variable,.. example:

var file = app_data/file.dat 

i need assigned variable because using variable parameter method,.. used :

var file= httpcontext.current.request.mappath("/app_data/file.dat"); 

but want path @ same project

if should absolute path should fine too

you need read file using 1 of available methods (streams, readers, etc).

the easiest be:

string filecontent = file.readalltext(filenameandpath); 

where variable filenameandpath contains full path , file name file described darin dimitrov.


Comments

Popular posts from this blog

java - Multi-Label Document Classification -

php - Dynamic url re-writing using htaccess -

python - How to create a legend for 3D bar in matplotlib? -