diff --git a/src/WebApiContrib.Formatting.Xlsx/XlsxMediaTypeFormatter.cs b/src/WebApiContrib.Formatting.Xlsx/XlsxMediaTypeFormatter.cs index 3adbbc1..894c02f 100644 --- a/src/WebApiContrib.Formatting.Xlsx/XlsxMediaTypeFormatter.cs +++ b/src/WebApiContrib.Formatting.Xlsx/XlsxMediaTypeFormatter.cs @@ -176,7 +176,7 @@ public override Task WriteToStreamAsync(Type type, object value, System.IO.Strea var metadata = ModelMetadataProviders.Current.GetMetadataForType(null, itemType); var properties = (from p in itemType.GetProperties() - where p.CanRead & p.GetGetMethod().IsPublic & p.GetGetMethod().GetParameters().Length == 0 + where p.CanRead && p.GetGetMethod().IsPublic && p.GetGetMethod().GetParameters().Length == 0 select p).ToList(); @@ -236,7 +236,7 @@ public override Task WriteToStreamAsync(Type type, object value, System.IO.Strea else if (info.ExcelAttribute != null && info.ExcelAttribute.FalseValue != null && cellValue.Equals("False")) row.Add(info.ExcelAttribute.FalseValue); - else if (!string.IsNullOrWhiteSpace(info.FormatString) & string.IsNullOrEmpty(info.ExcelNumberFormat)) + else if (!string.IsNullOrWhiteSpace(info.FormatString) && string.IsNullOrEmpty(info.ExcelNumberFormat)) row.Add(string.Format(info.FormatString, cellValue)); else