Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / Xml / System / Xml / Ref.cs / 1305376 / Ref.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
using System.Diagnostics;
namespace System.Xml {
///
/// Ref class is used to verify string atomization in debug mode.
///
internal static class Ref {
public static bool Equal(string strA, string strB) {
#if DEBUG
if (((object) strA != (object) strB) && string.Equals(strA, strB))
Debug.Assert(false, "Ref.Equal: Object comparison used for non-atomized string '" + strA + "'");
#endif
return (object) strA == (object) strB;
}
// Prevent typos. If someone uses Ref.Equals instead of Ref.Equal,
// the program would not compile.
public static new void Equals(object objA, object objB) {
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// [....]
//-----------------------------------------------------------------------------
using System.Diagnostics;
namespace System.Xml {
///
/// Ref class is used to verify string atomization in debug mode.
///
internal static class Ref {
public static bool Equal(string strA, string strB) {
#if DEBUG
if (((object) strA != (object) strB) && string.Equals(strA, strB))
Debug.Assert(false, "Ref.Equal: Object comparison used for non-atomized string '" + strA + "'");
#endif
return (object) strA == (object) strB;
}
// Prevent typos. If someone uses Ref.Equals instead of Ref.Equal,
// the program would not compile.
public static new void Equals(object objA, object objB) {
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- WebPartMinimizeVerb.cs
- CommandHelpers.cs
- TextWriter.cs
- UnsafeNativeMethods.cs
- WindowsGraphicsCacheManager.cs
- InstalledVoice.cs
- Compress.cs
- DeferredSelectedIndexReference.cs
- FtpWebResponse.cs
- KeyValuePairs.cs
- ScriptHandlerFactory.cs
- TextDpi.cs
- UpdateCommand.cs
- XmlDataSource.cs
- BCryptSafeHandles.cs
- LocatorManager.cs
- CodeDOMProvider.cs
- SvcMapFileLoader.cs
- DoubleLinkList.cs
- InkPresenterAutomationPeer.cs
- Themes.cs
- versioninfo.cs
- Evidence.cs
- BinaryKeyIdentifierClause.cs
- ToolStripDropDownMenu.cs
- LinkButton.cs
- DesignerHost.cs
- SharedStatics.cs
- DataControlReferenceCollection.cs
- Vector3DAnimationUsingKeyFrames.cs
- OrderByQueryOptionExpression.cs
- InheritablePropertyChangeInfo.cs
- ContentType.cs
- QueryLifecycle.cs
- DbParameterHelper.cs
- DesignerView.cs
- LicenseProviderAttribute.cs
- ServiceOperation.cs
- OrderedDictionary.cs
- ServiceOperationListItem.cs
- MsmqIntegrationMessageProperty.cs
- DesignTimeParseData.cs
- OracleConnectionStringBuilder.cs
- UnknownBitmapDecoder.cs
- SystemGatewayIPAddressInformation.cs
- CodeGenerator.cs
- GridViewHeaderRowPresenterAutomationPeer.cs
- EventHandlersDesigner.cs
- TypeTypeConverter.cs
- ScriptServiceAttribute.cs
- CompilerWrapper.cs
- WebPartCollection.cs
- SspiSafeHandles.cs
- RubberbandSelector.cs
- RoleManagerModule.cs
- DragEvent.cs
- ClientSettingsStore.cs
- WindowsFormsSectionHandler.cs
- TemplateControlBuildProvider.cs
- X509Certificate2Collection.cs
- GroupPartitionExpr.cs
- CodeTypeReference.cs
- NumericUpDownAcceleration.cs
- TypeSemantics.cs
- SendActivityDesignerTheme.cs
- ScrollEvent.cs
- State.cs
- FixedFindEngine.cs
- CodeLabeledStatement.cs
- RedirectionProxy.cs
- SevenBitStream.cs
- WebCodeGenerator.cs
- DataKeyCollection.cs
- DirtyTextRange.cs
- AttachInfo.cs
- CurrencyWrapper.cs
- CompositeCollectionView.cs
- DataKeyCollection.cs
- ListViewCancelEventArgs.cs
- IdentityVerifier.cs
- XmlSchemaImporter.cs
- Win32PrintDialog.cs
- WebPartMenu.cs
- Matrix3DValueSerializer.cs
- ObjRef.cs
- Timer.cs
- ChildDocumentBlock.cs
- ApplicationBuildProvider.cs
- SQLBinaryStorage.cs
- IPAddress.cs
- smtppermission.cs
- BrowserDefinitionCollection.cs
- DataErrorValidationRule.cs
- CodeGenHelper.cs
- storepermission.cs
- Win32Exception.cs
- EventSinkHelperWriter.cs
- BuildProvider.cs
- TypeDescriptionProvider.cs
- RequestCachingSection.cs