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
- SourceElementsCollection.cs
- TypeBuilderInstantiation.cs
- ConfigXmlElement.cs
- ParameterBuilder.cs
- DesignOnlyAttribute.cs
- BitmapEffectGroup.cs
- GridSplitter.cs
- EndpointDesigner.cs
- MeasureItemEvent.cs
- XPathNavigatorKeyComparer.cs
- IfElseDesigner.xaml.cs
- BaseComponentEditor.cs
- InstancePersistenceCommandException.cs
- Helper.cs
- Walker.cs
- ModifierKeysConverter.cs
- PlaceHolder.cs
- ContractMethodInfo.cs
- TriggerCollection.cs
- ImportFileRequest.cs
- ItemMap.cs
- PersistenceProviderFactory.cs
- Point.cs
- AdornerPresentationContext.cs
- WeakEventManager.cs
- XmlStreamStore.cs
- IdnElement.cs
- MsmqAuthenticationMode.cs
- SQLInt32.cs
- KerberosReceiverSecurityToken.cs
- DataTableClearEvent.cs
- TimeSpanParse.cs
- NotConverter.cs
- RoleGroup.cs
- NavigationWindow.cs
- SignalGate.cs
- ScrollEvent.cs
- SafeFileMapViewHandle.cs
- odbcmetadatacollectionnames.cs
- Margins.cs
- CharEnumerator.cs
- ArcSegment.cs
- NavigationWindow.cs
- HwndStylusInputProvider.cs
- ToolStripKeyboardHandlingService.cs
- ObjectAnimationUsingKeyFrames.cs
- MulticastNotSupportedException.cs
- XLinq.cs
- CallbackException.cs
- ProcessThread.cs
- _ConnectionGroup.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- SecurityContextSecurityTokenParameters.cs
- ColumnBinding.cs
- LoginUtil.cs
- EventQueueState.cs
- ProtocolsConfiguration.cs
- CompressionTransform.cs
- RectAnimationUsingKeyFrames.cs
- StringFormat.cs
- ProcessProtocolHandler.cs
- CollectionChangedEventManager.cs
- AliasGenerator.cs
- BinaryObjectReader.cs
- DelegateOutArgument.cs
- XmlSchemaCompilationSettings.cs
- InkPresenterAutomationPeer.cs
- CodeThrowExceptionStatement.cs
- SqlRewriteScalarSubqueries.cs
- HttpTransportManager.cs
- UniqueConstraint.cs
- AccessControlList.cs
- SoapServerMessage.cs
- WebSysDescriptionAttribute.cs
- ExpressionConverter.cs
- UniqueContractNameValidationBehavior.cs
- GridItemProviderWrapper.cs
- DataListAutoFormat.cs
- SystemFonts.cs
- BufferedReadStream.cs
- NameValueSectionHandler.cs
- DesignerTransaction.cs
- DetailsViewUpdateEventArgs.cs
- AdPostCacheSubstitution.cs
- MessageBox.cs
- HtmlContainerControl.cs
- FlowStep.cs
- XmlSchemaObjectTable.cs
- WebHttpBehavior.cs
- AuthorizationRuleCollection.cs
- DataRowCollection.cs
- ConfigXmlCDataSection.cs
- TcpAppDomainProtocolHandler.cs
- TypeCacheManager.cs
- ToolboxDataAttribute.cs
- PackagingUtilities.cs
- EntityViewContainer.cs
- WindowsGraphics.cs
- LinqDataSourceSelectEventArgs.cs
- ResourcesBuildProvider.cs