// this method is only called as part of an assert internal bool IsEqualTo(object compObject) { if ((object)compObject == null) { return(false); } if ((object)this == (object)compObject) { return(true); } NetworkCredential compCred = compObject as NetworkCredential; if ((object)compCred == null) { return(false); } #if FEATURE_PAL return(InternalGetUserName() == compCred.InternalGetUserName() && InternalGetPassword() == compCred.InternalGetPassword() && InternalGetDomain() == compCred.InternalGetDomain()); #else //!FEATURE_PAL return(InternalGetUserName() == compCred.InternalGetUserName() && InternalGetDomain() == compCred.InternalGetDomain() && UnsafeNclNativeMethods.SecureStringHelper.AreEqualValues(InternalGetSecurePassword(), compCred.InternalGetSecurePassword())); #endif //!FEATURE_PAL }