@darjan-bogdan's solution would be the way to go if it absolutely needs to be one line for some reason.
However, if the goal is to just have a single-line logic statement for adding an attachment, I'd just use a helper method, à la:
Attachment data = BuildAttachment(new MemoryStream(filebytes), "QRCode.png"));
...
private Attachment BuildAttachment(MemoryStream stream, string name) {
Attachment attachment = new Attachment(stream, name);
attachment.ContentDisposition.Inline = true;
return attachment;
}
This preserves your "single line" in what I assume is your for-loop.