Hi, I get on the line
int count = int.Parse(listHeader[1]);
the following error. "Input string was not in a correct format."
Under Visual Studio 2003 I had no problem with it. Now I am using Visual Studio 2005 and Error. Why?
thanks in advance
VB Code:
/// <summary> /// Get all mails form the pop3 server. /// </summary> /// <param name="body"> /// If set it returns mailheader and message. /// </param> /// <returns></returns> public MailHeader[] GetMails(bool body) { string list = GetList(); if(list==null || list.Length==0 || !list.StartsWith("+OK")) return null; string[] param = list.Split('\n'); string[] listHeader = param[0].Split(' '); int count = int.Parse(listHeader[1]); MailHeader[] myHeader = new MailHeader[count]; for (int n=0;n<count;n++) { string[] msg = param[n+1].Split(' '); myHeader[n] = GetMail(int.Parse(msg[0]),body); } return myHeader; }
Added green "resolved" checkmark - Hack




Reply With Quote