Code:
/ 4.0 / 4.0 / untmp / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- RadialGradientBrush.cs
- DataServiceRequestOfT.cs
- PasswordDeriveBytes.cs
- PageHandlerFactory.cs
- RequestResizeEvent.cs
- SqlDataSourceWizardForm.cs
- HtmlInputHidden.cs
- Attributes.cs
- ThrowHelper.cs
- EmptyEnumerator.cs
- WindowsSidIdentity.cs
- ToolStripItemEventArgs.cs
- RSAOAEPKeyExchangeFormatter.cs
- XmlTextReaderImpl.cs
- ForeignConstraint.cs
- ConstantSlot.cs
- UnsafeNativeMethods.cs
- WebPartsSection.cs
- BezierSegment.cs
- HttpHandlerAction.cs
- GroupBoxAutomationPeer.cs
- XPathNavigatorKeyComparer.cs
- NetNamedPipeSecurity.cs
- ContentType.cs
- clipboard.cs
- Win32Interop.cs
- XmlAtomicValue.cs
- ReaderWriterLock.cs
- ContentElement.cs
- ComboBoxRenderer.cs
- CalendarDay.cs
- AssemblyAttributes.cs
- DataRecordInternal.cs
- ErrorWrapper.cs
- RuleConditionDialog.Designer.cs
- GridViewDeletedEventArgs.cs
- ControlCommandSet.cs
- GeometryCombineModeValidation.cs
- UrlPath.cs
- WmiPutTraceRecord.cs
- DataViewManagerListItemTypeDescriptor.cs
- OdbcErrorCollection.cs
- PackUriHelper.cs
- TextRange.cs
- DispatchWrapper.cs
- PerformanceCountersElement.cs
- ClassValidator.cs
- CellNormalizer.cs
- Array.cs
- IDictionary.cs
- SHA1Managed.cs
- XsltException.cs
- TagMapInfo.cs
- FormViewAutoFormat.cs
- ThreadStateException.cs
- DataTemplate.cs
- TextWriterTraceListener.cs
- TypedTableBase.cs
- ToolStripDropTargetManager.cs
- StorageMappingItemLoader.cs
- XmlSchemaGroupRef.cs
- Composition.cs
- WindowsScroll.cs
- NotifyCollectionChangedEventArgs.cs
- Cursor.cs
- Emitter.cs
- ComplusTypeValidator.cs
- SecurityContext.cs
- XPathBinder.cs
- InvalidDataContractException.cs
- Documentation.cs
- CountAggregationOperator.cs
- ApplicationInfo.cs
- DetailsViewDeleteEventArgs.cs
- InfiniteIntConverter.cs
- SpanIndex.cs
- EmbeddedObject.cs
- FontFamilyConverter.cs
- TimeSpan.cs
- XamlTypeMapper.cs
- AssemblyAssociatedContentFileAttribute.cs
- ChangesetResponse.cs
- DataServiceQuery.cs
- Model3D.cs
- LoginCancelEventArgs.cs
- XmlTextReaderImplHelpers.cs
- DesignerVerbCollection.cs
- XmlSchemaSearchPattern.cs
- ConstructorNeedsTagAttribute.cs
- ResourcesChangeInfo.cs
- ProtocolsConfigurationEntry.cs
- SortKey.cs
- CommandID.cs
- XmlQuerySequence.cs
- ConnectionPointConverter.cs
- WorkflowWebHostingModule.cs
- GradientBrush.cs
- TextRenderer.cs
- StandardCommands.cs
- XamlTypeMapper.cs