Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / clr / src / BCL / System / Reflection / Emit / PropertyToken.cs / 1 / PropertyToken.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: PropertyToken
**
**
** Propertybuilder is for client to define properties for a class
**
**
===========================================================*/
namespace System.Reflection.Emit {
using System;
using System.Reflection;
using System.Security.Permissions;
[Serializable()]
[System.Runtime.InteropServices.ComVisible(true)]
public struct PropertyToken {
public static readonly PropertyToken Empty = new PropertyToken();
internal int m_property;
internal PropertyToken(int str) {
m_property=str;
}
public int Token {
get { return m_property; }
}
// Satisfy value class requirements
public override int GetHashCode()
{
return m_property;
}
// Satisfy value class requirements
public override bool Equals(Object obj)
{
if (obj is PropertyToken)
return Equals((PropertyToken)obj);
else
return false;
}
public bool Equals(PropertyToken obj)
{
return obj.m_property == m_property;
}
public static bool operator ==(PropertyToken a, PropertyToken b)
{
return a.Equals(b);
}
public static bool operator !=(PropertyToken a, PropertyToken b)
{
return !(a == b);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: PropertyToken
**
**
** Propertybuilder is for client to define properties for a class
**
**
===========================================================*/
namespace System.Reflection.Emit {
using System;
using System.Reflection;
using System.Security.Permissions;
[Serializable()]
[System.Runtime.InteropServices.ComVisible(true)]
public struct PropertyToken {
public static readonly PropertyToken Empty = new PropertyToken();
internal int m_property;
internal PropertyToken(int str) {
m_property=str;
}
public int Token {
get { return m_property; }
}
// Satisfy value class requirements
public override int GetHashCode()
{
return m_property;
}
// Satisfy value class requirements
public override bool Equals(Object obj)
{
if (obj is PropertyToken)
return Equals((PropertyToken)obj);
else
return false;
}
public bool Equals(PropertyToken obj)
{
return obj.m_property == m_property;
}
public static bool operator ==(PropertyToken a, PropertyToken b)
{
return a.Equals(b);
}
public static bool operator !=(PropertyToken a, PropertyToken b)
{
return !(a == b);
}
}
}
// 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
- WindowsIdentity.cs
- AssociatedControlConverter.cs
- ToolStripItemClickedEventArgs.cs
- CommentAction.cs
- CompilationLock.cs
- XslCompiledTransform.cs
- WebPartDisplayModeCancelEventArgs.cs
- DesignerActionService.cs
- FontStretches.cs
- IconConverter.cs
- MetabaseServerConfig.cs
- NameValueConfigurationElement.cs
- WebPartConnectionsEventArgs.cs
- Utils.cs
- ClientTargetCollection.cs
- TextRange.cs
- RelatedEnd.cs
- ToolStripContentPanelRenderEventArgs.cs
- UriTemplateCompoundPathSegment.cs
- NameGenerator.cs
- ScrollItemProviderWrapper.cs
- ScriptHandlerFactory.cs
- HotCommands.cs
- TypeUtil.cs
- MenuBindingsEditor.cs
- BCryptHashAlgorithm.cs
- XmlSchemaObjectCollection.cs
- ImageAnimator.cs
- Transform.cs
- ActivityCompletionCallbackWrapper.cs
- RawTextInputReport.cs
- DelayedRegex.cs
- EmptyImpersonationContext.cs
- SecurityContextTokenCache.cs
- FixedDSBuilder.cs
- CFStream.cs
- MessageLogTraceRecord.cs
- SessionEndingEventArgs.cs
- MarkupProperty.cs
- FormsAuthenticationEventArgs.cs
- DesignerAttribute.cs
- RowUpdatingEventArgs.cs
- DesignerActionVerbList.cs
- CodeCommentStatementCollection.cs
- ScriptReference.cs
- BoundColumn.cs
- BitmapPalettes.cs
- ItemCollection.cs
- EventEntry.cs
- ConfigXmlSignificantWhitespace.cs
- NetTcpBinding.cs
- Rotation3DAnimation.cs
- AnnotationDocumentPaginator.cs
- MouseOverProperty.cs
- SpnEndpointIdentity.cs
- XPathDescendantIterator.cs
- BridgeDataReader.cs
- NamespaceInfo.cs
- DES.cs
- DataGridTablesFactory.cs
- TabControl.cs
- ImagingCache.cs
- dtdvalidator.cs
- OracleException.cs
- GenericRootAutomationPeer.cs
- MimeBasePart.cs
- RawContentTypeMapper.cs
- XmlChildNodes.cs
- EntityClientCacheEntry.cs
- TextEditorDragDrop.cs
- RawStylusSystemGestureInputReport.cs
- DecoderFallback.cs
- UserPersonalizationStateInfo.cs
- StreamResourceInfo.cs
- DbUpdateCommandTree.cs
- COM2IProvidePropertyBuilderHandler.cs
- Point4DConverter.cs
- PinnedBufferMemoryStream.cs
- ModuleBuilder.cs
- SelectQueryOperator.cs
- BitmapEffectvisualstate.cs
- CompilerErrorCollection.cs
- Emitter.cs
- DataRelationCollection.cs
- EnumUnknown.cs
- DataServiceResponse.cs
- TextSegment.cs
- OverrideMode.cs
- PersonalizablePropertyEntry.cs
- PersonalizationProvider.cs
- HybridObjectCache.cs
- coordinatorscratchpad.cs
- XmlSchemaAny.cs
- DataControlFieldCell.cs
- StringOutput.cs
- InfoCardSymmetricCrypto.cs
- LayoutManager.cs
- AutoGeneratedFieldProperties.cs
- BounceEase.cs
- PeerObject.cs