StringSplitOptions.RemoveEmptyEntries doesn’t work as advertised
Most likely because you change the string after the split. You trim the values after splitting them, RemoveEmptyEntries doesn’t consider the string ” ” empty. The following would achieve what you want, basically creating your own strip empty elements: var tagsSplit = tags.Split(‘,’). Select(tag => tag.Trim()). Where( tag => !string.IsNullOrEmpty(tag));