bool IsContentType (string ct, bool starts_with) { if (starts_with) return StrUtils.StartsWith (ContentType, ct, true); return String.Compare (ContentType, ct, true, Helpers.InvariantCulture) == 0; }