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
- Int64AnimationUsingKeyFrames.cs
- DynamicRenderer.cs
- SecurityPolicySection.cs
- XmlTextAttribute.cs
- WindowAutomationPeer.cs
- GridView.cs
- CookielessHelper.cs
- FileSystemWatcher.cs
- FilteredReadOnlyMetadataCollection.cs
- DefaultObjectMappingItemCollection.cs
- NumberSubstitution.cs
- AnalyzedTree.cs
- SizeConverter.cs
- SimpleWorkerRequest.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- BufferedStream.cs
- BooleanToVisibilityConverter.cs
- NativeMethods.cs
- SQLSingleStorage.cs
- ByeMessageCD1.cs
- ThumbAutomationPeer.cs
- GacUtil.cs
- ExtentJoinTreeNode.cs
- ExpressionBuilder.cs
- OleDbReferenceCollection.cs
- RelatedView.cs
- FixedSOMPageConstructor.cs
- MultiPageTextView.cs
- Message.cs
- SoapDocumentMethodAttribute.cs
- ButtonChrome.cs
- InvokeSchedule.cs
- XmlAnyElementAttributes.cs
- InfocardChannelParameter.cs
- NamespaceTable.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- EdmType.cs
- OdbcParameterCollection.cs
- TypedElement.cs
- path.cs
- StyleCollection.cs
- ImportedNamespaceContextItem.cs
- Decoder.cs
- DynamicHyperLink.cs
- CallbackValidator.cs
- DateTimeConverter.cs
- ClientProxyGenerator.cs
- WindowsStatic.cs
- ObjectQuery.cs
- EntitySqlQueryCacheEntry.cs
- SamlDoNotCacheCondition.cs
- PenLineJoinValidation.cs
- Native.cs
- XmlEnumAttribute.cs
- MetadataProperty.cs
- DbParameterCollectionHelper.cs
- TileBrush.cs
- FigureHelper.cs
- MenuCommand.cs
- StylusPointPropertyInfoDefaults.cs
- AnimationStorage.cs
- SettingsAttributeDictionary.cs
- CommandBinding.cs
- StringUtil.cs
- ListBox.cs
- SplitterCancelEvent.cs
- InputProviderSite.cs
- HttpDictionary.cs
- DbReferenceCollection.cs
- TriggerBase.cs
- SqlBuilder.cs
- ListDictionary.cs
- GroupStyle.cs
- DataSourceXmlSerializer.cs
- XamlToRtfWriter.cs
- SessionState.cs
- Expressions.cs
- BamlBinaryReader.cs
- ProvidersHelper.cs
- ExplicitDiscriminatorMap.cs
- DataObject.cs
- ApplicationContext.cs
- OleDbPermission.cs
- SelectionRangeConverter.cs
- Expression.DebuggerProxy.cs
- EntitySqlQueryCacheEntry.cs
- WSTrustFeb2005.cs
- ReadOnlyDataSource.cs
- WebDisplayNameAttribute.cs
- UserPreferenceChangingEventArgs.cs
- SqlUdtInfo.cs
- XmlUrlResolver.cs
- CustomTokenProvider.cs
- Span.cs
- SBCSCodePageEncoding.cs
- XmlDataSourceView.cs
- WindowsListView.cs
- DirtyTextRange.cs
- RegexStringValidator.cs
- XmlDataLoader.cs