/// <summary> /// Gets the media type for the body /// </summary> /// <param name="Header">The header of the message</param> /// <returns>An enum value indicating the media type of the boundary</returns> private MediaEnum GetMediaType(MIMEHeader Header) { string ContentType = GetContentType(Header); int x = 0; foreach (string TempType in MIMEType.TypeTable) { if (TempType.Equals(ContentType, StringComparison.InvariantCultureIgnoreCase)) { return (MediaEnum)x; } ++x; } return (MediaEnum)MIMEType.TypeTable.Length - 1; }