There a method called ProccesXmlResponse and there is line written below.
var myMessages = messages.OrderByDescending(x => x.MessageSentDate).ToList();
MessageSentDate is type of DateTime. and I am initializing the messages object for sure.although I got the below exception.Please help
Type : System.NullReferenceException, mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089
Message : Object reference not set to an instance of an object.
Source : PHOnline.Application.Service
Help link : 
Data : System.Collections.ListDictionaryInternal
TargetSite : System.DateTime <ProccesXmlResponse>b__6(PHOnline.Application.Model.DTO.Vitality.MyMessage)
HResult : -2147467261
Stack Trace :    at PHOnline.Application.Service.Implementations.Vitality.MyMessagesResponseMapper.<ProccesXmlResponse>b__6(MyMessage x)
   at System.Linq.EnumerableSorter`2.ComputeKeys(TElement[] elements, Int32 count)
   at System.Linq.EnumerableSorter`1.Sort(TElement[] elements, Int32 count)
   at System.Linq.OrderedEnumerable`1.<GetEnumerator>d__0.MoveNext()
   at System.Collections.Generic.List`1..ctor(IEnumerable`1 collection)
   at System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source)
   at PHOnline.Application.Service.Implementations.Vitality.MyMessagesResponseMapper.ProccesXmlResponse(String response)
Model class: public class MyMessage { /// /// Gets or sets EntityNumber. /// public string MessageID { get; set; }
    /// <summary>
    ///     Gets or sets EntityNumber.
    /// </summary>
    public string MessageSubject { get; set; }
    /// <summary>
    ///     Gets or sets EntityNumber.
    /// </summary>
    public DateTime MessageSentDate { get; set; }
    /// <summary>
    ///     Gets or sets EntityNumber.
    /// </summary>
    public string Read { get; set; }
    /// <summary>
    ///     Gets or sets EntityNumber.
    /// </summary>
    public string FileName { get; set; }
    /// <summary>
    ///     Gets or sets EntityNumber.
    /// </summary>
    public string MIMEType { get; set; }
    /// <summary>
    ///     Gets or sets EntityNumber.
    /// </summary>
    public string AttachmentContent { get; set; }
}
 
    