// Creates a new tag type on the file if needed, depending on the input file type. Returns true if a new tag was created. The out variable usedTagType is set to the tag that should be used public static bool CreateTagIfRequired(TagLib.File file, out TagTypes usedTagType) { usedTagType = TagTypes.None; if (!PREFERRED_TAGTYPES.TryGetValue(file.GetType(), out TagTypes[] tagTypes))