brilliant,
thank you, i'll have a play about and see if i can get it running.
thanks again!...
User Profile
Collapse
-
Sending an Email from C#
hi,
i am trying to add the functionality into my code to send an email.
this is my code snippet.
...Code:using System; using System.IO; using System.Net.Mail; namespace logchecktest1 { class Program { private void SendMail() { MailMessage MyMail = new MailMessage(); SmtpClient server = newLast edited by Frinavale; Jun 2 '10, 03:37 PM. Reason: Fixed the code tag. An ending [/code] was missing. -
-
looping query - pulling back results?
hi,
i have managed to put together a program that reads a file and if it finds the word "error" it brings back that line of details...
unfortunately, it stops on that line...
does anybody know how i get it to carry on through an entire log?
this is my code so far
...Code:{ class Program { public static void Main(string[] args) { -
-
sorry if it's unclear, i'm still very new to programming...
I am trying to develop a console app, that will run through error logs, if it finds an error it flags it up...
to save the manual process of reading through lots of logs.
i may well just be misguided in my approach, in which case it will be back to the books...
just thought i'd pop it on here on the off chance
t...Leave a comment:
-
thank you for the reply,
this is what i have, but at the minute... i dont know what it's doing because the cmd box opens and closes instantly not allowing me to see any results
...Code:{ FileStream fout; System.IO.FileInfo f = new System.IO.FileInfo("C:\\Documents and Settings\\kwareham01\\Desktop\\test log.txt"); // System.IO.FileStream s = f.Open(System.IO.FileMode.Open,Last edited by Frinavale; May 27 '10, 02:54 PM. Reason: Please post code in [code] ... [/code] tags. Added code tags.Leave a comment:
-
How to read text from a file and populating a message?
Does anybody know how to read from a text file and if it contains a certain word or phrase (for example - error) to then flag up the error?
if possible...quot ing the whole line of text the "Error" is on?
No activity results to display
Show More
Leave a comment: