Hi,
you can do it using System.Linq:
var directory = new DirectoryInfo(Server.MapPath("/files/"));
var myFile = (from f in directory.GetFiles()
where f.Name.EndsWith(".cst")
orderby f.LastWriteTime descending
select f).FirstOrDefault();
var email = new EmailMessage()
{
...
};
email.Attachments.Add(new System.Net.Mail.Attachment(Server.MapPath(myFile.Name)));
// Send e-mail
EmailSender.SendEmail(email);