C# Get an Attachment
// Download and attachment
public bool AttachmentDownload()
{
  try
  {
    Bug bugObj;
    AttachmentFactory attachFact;
    Attachment attachObj;
    List attachList;
    String LoadPath;
    BugFactory bugFac = (BugFactory)tdConnection.BugFactory;

    //Get any defect with at least one attachment
    bugObj = (Bug)bugFac[1];
    Debug.Print(bugObj.Summary);
    
    //Get an attachment
    attachFact = bugObj.Attachments;
    attachList = attachFact.NewList("");
    attachObj = attachList[1];
    Debug.Print(attachObj.FileName);
    
    //Put a value in LoadPath to demonstrate that it is not used.
    LoadPath = @"C:\HP\";
    attachObj.Load(true, ref LoadPath);
    Debug.Print(LoadPath);

    return true;//AttachmentDownLoad = SUCCESS
  }
  catch (Exception)
  {
    return false;//AttachmentDownLoad = FAILURE
  }
}