private string DescribeMediaType(MediaType mediaType) { int attributeCount = mediaType.Count; var sb = new StringBuilder(); for (int n = 0; n < attributeCount; n++) { Guid key; var val = MediaType.GetByIndex(n, out key); string propertyName = FieldDescriptionHelper.Describe(typeof(NAudio.MediaFoundation.MediaFoundationAttributes), key); sb.AppendFormat("{0}={1}\r\n", propertyName, val); //val.Clear(); } return(sb.ToString()); }