I'm trying to replicate the attributes text that appears in File Explorer, for files and directories.I can't just use the enum names, as the summary text uses a single character for each set flag, and that character isn't always the first character of the enum member. I'm also not using the reserved FileAttribute.Device attribute. So, I'm using a string.join operation to concatenate the flag characters.    public string AttributeSummary    {        get        {            FileAttributes fatt = (FileAttributes)_attribs;            return string.Join(string.Empty,                (fatt.HasFlag(FileAttributes.ReadOnly) ?          R : string.Empty),                (fatt.HasFlag(FileAttributes.Hidden) ?            H : string.Empty),                (fatt.HasFlag(FileAttributes.System) ?            S : string.Empty),                (fatt.HasFlag(FileAttributes.Directory) ?         D : string.Empty),                (fatt.HasFlag(FileAttributes.Archive) ?           A : string.Empty),                (fatt.HasFlag(FileAttributes.Normal) ?            N : string.Empty),                (fatt.HasFlag(FileAttributes.Temporary) ?         T : string.Empty),                (fatt.HasFlag(FileAttributes.SparseFile) ?        P : string.Empty),                (fatt.HasFlag(FileAttributes.ReparsePoint) ?      L : string.Empty),                (fatt.HasFlag(FileAttributes.Compressed) ?        C : string.Empty),                (fatt.HasFlag(FileAttributes.Offline) ?           O : string.Empty),                (fatt.HasFlag(FileAttributes.NotContentIndexed) ? I : string.Empty),                (fatt.HasFlag(FileAttributes.Encrypted) ?         E : string.Empty),                (fatt.HasFlag(FileAttributes.IntegrityStream) ?   V : string.Empty),                (fatt.HasFlag(FileAttributes.NoScrubData) ?       X : string.Empty));        }    }Am I going about this in the most efficient way?
Building a summary string from a flags enum
c#;strings;file system;enum