Click here to Skip to main content
15,902,276 members
Home / Discussions / C#
   

C#

 
GeneralRe: Reading Text files Pin
Pete O'Hanlon18-Feb-08 8:44
mvePete O'Hanlon18-Feb-08 8:44 
GeneralRe: Reading Text files Pin
Skippums18-Feb-08 10:49
Skippums18-Feb-08 10:49 
GeneralRe: Reading Text files Pin
Brady Kelly18-Feb-08 19:18
Brady Kelly18-Feb-08 19:18 
QuestionTranslate small class from C# to VB :-) Pin
rafiki27218-Feb-08 6:44
rafiki27218-Feb-08 6:44 
GeneralRe: Translate small class from C# to VB :-) Pin
DaveyM6918-Feb-08 8:03
professionalDaveyM6918-Feb-08 8:03 
GeneralRe: Translate small class from C# to VB :-) Pin
Dave Doknjas18-Feb-08 13:42
Dave Doknjas18-Feb-08 13:42 
QuestionCalling Application from email link Pin
matt23lucier18-Feb-08 5:43
matt23lucier18-Feb-08 5:43 
GeneralResources.resx Pin
ziwez018-Feb-08 3:27
ziwez018-Feb-08 3:27 
Hi,

I need to write some log info out of my app and into a text file.

I might not be doing this the right way so let me know if im not, basically I want to write to a text file but when I deploy the package I want the text file to write to the location of the app ie like (c:/program files/my application/log).

I added a text file to resources.resx called Log.txt.
Ive set the properties(build action) of the text file as content as i want to be able to access this data.

how do i write to this file?
i got something like this but it dont work

FileInfo fi = new FileInfo(Properties.Resources.Elog);


if (fi.Exists.Equals(true))
{
ResourceManager rm = new ResourceManager();
FileStream fsWrite = new FileStream(Properties.Resources.Elog, FileMode.Append);
StreamWriter sw = new StreamWriter(fsWrite);
sw.WriteLine(DateTime.Now + ":" + xInternalError);
sw.Close();
}
GeneralRe: Resources.resx Pin
Skippums18-Feb-08 3:51
Skippums18-Feb-08 3:51 
GeneralRe: Resources.resx Pin
ziwez018-Feb-08 4:33
ziwez018-Feb-08 4:33 
GeneralRe: Resources.resx Pin
J a a n s18-Feb-08 4:43
professionalJ a a n s18-Feb-08 4:43 
GeneralRe: Resources.resx Pin
J a a n s18-Feb-08 4:36
professionalJ a a n s18-Feb-08 4:36 
GeneralRe: Resources.resx Pin
Paddy Boyd18-Feb-08 4:56
Paddy Boyd18-Feb-08 4:56 
GeneralNeed C# training course (preferably video) Pin
logikos18-Feb-08 3:08
logikos18-Feb-08 3:08 
GeneralRe: Need C# training course (preferably video) Pin
Pete O'Hanlon18-Feb-08 3:25
mvePete O'Hanlon18-Feb-08 3:25 
GeneralRe: Need C# training course (preferably video) Pin
logikos18-Feb-08 3:36
logikos18-Feb-08 3:36 
GeneralRe: Need C# training course (preferably video) Pin
Pete O'Hanlon18-Feb-08 3:42
mvePete O'Hanlon18-Feb-08 3:42 
GeneralRe: Need C# training course (preferably video) Pin
logikos18-Feb-08 4:13
logikos18-Feb-08 4:13 
GeneralRe: Need C# training course (preferably video) Pin
Pete O'Hanlon18-Feb-08 4:25
mvePete O'Hanlon18-Feb-08 4:25 
GeneralRe: Need C# training course (preferably video) Pin
logikos18-Feb-08 5:06
logikos18-Feb-08 5:06 
Generalxsd file from xml Pin
topksharma198218-Feb-08 2:52
topksharma198218-Feb-08 2:52 
GeneralRe: xsd file from xml Pin
Mircea Puiu18-Feb-08 3:48
Mircea Puiu18-Feb-08 3:48 
QuestionHow do display all the fields on C# ASP.NET getting from webservices. Pin
Tamizh18-Feb-08 2:51
Tamizh18-Feb-08 2:51 
GeneralRe: How do display all the fields on C# ASP.NET getting from webservices. Pin
Pete O'Hanlon18-Feb-08 3:41
mvePete O'Hanlon18-Feb-08 3:41 
QuestionRe: How do display all the fields on C# ASP.NET getting from webservices. Pin
Tamizh24-Feb-08 23:37
Tamizh24-Feb-08 23:37 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.