diff --git a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_LoadStore.cs b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_LoadStore.cs index c0e4c99e7fa7d..f27aad7412f00 100644 --- a/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_LoadStore.cs +++ b/src/libraries/System.DirectoryServices.AccountManagement/src/System/DirectoryServices/AccountManagement/AD/ADStoreCtx_LoadStore.cs @@ -630,7 +630,7 @@ private Principal FindPrincipalByIdentRefHelper( innerLdapFilter.Append(')'); - ldapFilter.Append(innerLdapFilter.ToString()); + ldapFilter.Append(innerLdapFilter); } // Wrap off the filter diff --git a/src/libraries/System.DirectoryServices/src/Interop/AdsValueHelper2.cs b/src/libraries/System.DirectoryServices/src/Interop/AdsValueHelper2.cs index 9bf258bf70e27..1579abce666c5 100644 --- a/src/libraries/System.DirectoryServices/src/Interop/AdsValueHelper2.cs +++ b/src/libraries/System.DirectoryServices/src/Interop/AdsValueHelper2.cs @@ -153,7 +153,7 @@ public object GetValue() strb.Append("B:"); strb.Append(binaryPart.Length); strb.Append(':'); - strb.Append(binaryPart.ToString()); + strb.Append(binaryPart); strb.Append(':'); strb.Append(Marshal.PtrToStringUni(dnb.pszDNString));