Click here to Skip to main content
15,892,965 members
Home / Discussions / C#
   

C#

 
Questioncheck for .doc application Pin
Jassim Rahma29-Mar-10 12:23
Jassim Rahma29-Mar-10 12:23 
AnswerRe: check for .doc application Pin
PSK_29-Mar-10 17:13
PSK_29-Mar-10 17:13 
QuestionStart adobe reader maximized Pin
Jassim Rahma29-Mar-10 12:21
Jassim Rahma29-Mar-10 12:21 
AnswerRe: Start adobe reader maximized Pin
Andrew Rissing29-Mar-10 15:20
Andrew Rissing29-Mar-10 15:20 
AnswerRe: Start adobe reader maximized Pin
Som Shekhar29-Mar-10 17:02
Som Shekhar29-Mar-10 17:02 
Questionbind textbox to XML node Pin
Jassim Rahma29-Mar-10 12:00
Jassim Rahma29-Mar-10 12:00 
QuestionReusable TableAdapters and such for Lookup Tables? Pin
Bert Edens29-Mar-10 11:40
Bert Edens29-Mar-10 11:40 
QuestionReading message Id's from a file?!? Pin
MWRivera29-Mar-10 11:13
MWRivera29-Mar-10 11:13 
Hi all,

I'm trying to expand the code here:

http://www.fryan0911.com/2009/05/how-to-read-pop3-email-using-c.html[^]

so that previosly read messages aren't read over again. I thought I could make this work by storing previosly read messages Id's in a text file and compare these Ids to the message Ids retrieved from the server. The problem I'm having is when trying to assign a message id to the sLine variable as you can see below:

//opens streamreader to read in readIDs
     StreamReader objReader = new StreamReader(readIDPath + "readIDs");
     POPMessageId sLine;

     int i = 0;
     //read until end of file
     while (objReader != null)
     {
           sLine = objReader.ReadLine();    // <-- GET ERROR HERE
           if (sLine != null)   
           {
               //add each line of text file in
               readIDs[i] = sLine;
               i++;
            }
      }
      objReader.Close();


The error I get is:

Error: Cannot convert type 'string' to 'SmtPop.POPMessageId'

I've tried casting the string to type POPMessageId but that doesn't fix it. Is there a way I can store the Id's in the file as type PopMessageId or retrieve them as this type? I'm new to working with files in C# but I'm sure it must be possible.



Hope you can help.
Mel
AnswerRe: Reading message Id's from a file?!? Pin
Not Active29-Mar-10 12:12
mentorNot Active29-Mar-10 12:12 
GeneralRe: Reading message Id's from a file?!? Pin
MWRivera30-Mar-10 6:42
MWRivera30-Mar-10 6:42 
GeneralRe: Reading message Id's from a file?!? Pin
Not Active30-Mar-10 7:23
mentorNot Active30-Mar-10 7:23 
GeneralRe: Reading message Id's from a file?!? Pin
MWRivera30-Mar-10 8:04
MWRivera30-Mar-10 8:04 
QuestionHow to take the snapshot of a IE webpage through a BHO (C#) Pin
kumar kapil29-Mar-10 10:39
kumar kapil29-Mar-10 10:39 
QuestionFilenames and open file dialog Pin
SRJ9229-Mar-10 8:58
SRJ9229-Mar-10 8:58 
AnswerRe: Filenames and open file dialog Pin
Wes Aday29-Mar-10 9:15
professionalWes Aday29-Mar-10 9:15 
AnswerRe: Filenames and open file dialog Pin
OriginalGriff29-Mar-10 9:32
mveOriginalGriff29-Mar-10 9:32 
GeneralRe: Filenames and open file dialog [modified] Pin
SRJ9229-Mar-10 9:46
SRJ9229-Mar-10 9:46 
GeneralRe: Filenames and open file dialog Pin
Not Active29-Mar-10 9:53
mentorNot Active29-Mar-10 9:53 
GeneralRe: Filenames and open file dialog Pin
SRJ9229-Mar-10 9:54
SRJ9229-Mar-10 9:54 
GeneralRe: Filenames and open file dialog Pin
Dave Kreskowiak29-Mar-10 10:00
mveDave Kreskowiak29-Mar-10 10:00 
GeneralRe: Filenames and open file dialog Pin
SRJ9229-Mar-10 10:07
SRJ9229-Mar-10 10:07 
QuestionDoes anybody have ups rate calculator for asp.net? Pin
bigeyed29-Mar-10 7:15
bigeyed29-Mar-10 7:15 
AnswerRe: Does anybody have ups rate calculator for asp.net? Pin
Not Active29-Mar-10 7:28
mentorNot Active29-Mar-10 7:28 
AnswerRe: Does anybody have ups rate calculator for asp.net? Pin
Dave Kreskowiak29-Mar-10 9:57
mveDave Kreskowiak29-Mar-10 9:57 
Questiondid you Google Block Gmail?! Pin
Jassim Rahma29-Mar-10 5:50
Jassim Rahma29-Mar-10 5:50 

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.