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

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -