Thanks Appajee. It does the job :-)

André

On 21/06/2011 18:48, Papolu, Appajee wrote:
        string Encode(StatusHistory sh)
        {
           string encoded = "";
           System.DateTime unixEpoch = new System.DateTime(1970, 1, 1, 0, 0, 0);
           foreach (StatusHistoryItem item in sh)
           {
              if (item.Time != System.DateTime.MaxValue)
              {
                 System.TimeSpan span = item.Time - unixEpoch;
                 encoded += span.TotalSeconds;
                 encoded += (char)4;
                 encoded += item.User;
              }
              encoded += (char)3;
           }
           return encoded;
        }


_______________________________________________________________________________
UNSUBSCRIBE or access ARSlist Archives at www.arslist.org
attend wwrug11 www.wwrug.com ARSList: "Where the Answers Are"

Reply via email to