Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Reflection / Emit / PropertyToken.cs / 1305376 / 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
- MergeEnumerator.cs
- KnownTypesProvider.cs
- GlyphsSerializer.cs
- PkcsMisc.cs
- Imaging.cs
- XmlSchemaAnnotation.cs
- PackagePartCollection.cs
- AuthorizationContext.cs
- LineInfo.cs
- BinaryFormatterWriter.cs
- StyleSelector.cs
- StorageMappingItemLoader.cs
- MonthCalendar.cs
- AccessText.cs
- MSHTMLHostUtil.cs
- ImageButton.cs
- CrossAppDomainChannel.cs
- RemotingException.cs
- TextWriterTraceListener.cs
- WithParamAction.cs
- DefaultMemberAttribute.cs
- PriorityChain.cs
- filewebresponse.cs
- RayHitTestParameters.cs
- TextParagraph.cs
- XmlImplementation.cs
- DataGridColumnsPage.cs
- Win32KeyboardDevice.cs
- CorrelationTokenInvalidatedHandler.cs
- AttributeQuery.cs
- HashMembershipCondition.cs
- DataGridRow.cs
- TextBoxRenderer.cs
- _AutoWebProxyScriptWrapper.cs
- PolyQuadraticBezierSegment.cs
- ConsoleCancelEventArgs.cs
- EntityObject.cs
- SecureEnvironment.cs
- ExpressionBuilder.cs
- FocusWithinProperty.cs
- Border.cs
- InfiniteIntConverter.cs
- CfgParser.cs
- DependencyStoreSurrogate.cs
- WindowsGraphics2.cs
- ComponentChangedEvent.cs
- Clause.cs
- ObjectQuery.cs
- Visual.cs
- GeneralTransform2DTo3D.cs
- XPathNodePointer.cs
- DataGridViewCellErrorTextNeededEventArgs.cs
- ManifestSignedXml.cs
- ReflectEventDescriptor.cs
- EntryIndex.cs
- BuildResultCache.cs
- DataObjectPastingEventArgs.cs
- SqlCacheDependencyDatabaseCollection.cs
- IisTraceWebEventProvider.cs
- HttpPostLocalhostServerProtocol.cs
- DataContractSerializerOperationFormatter.cs
- EntityViewContainer.cs
- IResourceProvider.cs
- CacheEntry.cs
- UIElementIsland.cs
- ConfigurationElement.cs
- ExpressionHelper.cs
- DoubleCollectionValueSerializer.cs
- XsdDataContractExporter.cs
- StylusPointPropertyUnit.cs
- TrackingMemoryStreamFactory.cs
- ExpressionParser.cs
- CollectionChangeEventArgs.cs
- WebPartDescription.cs
- LazyInitializer.cs
- SqlMethodCallConverter.cs
- VoiceSynthesis.cs
- WindowsScroll.cs
- Switch.cs
- SystemTcpConnection.cs
- PropertiesTab.cs
- Pen.cs
- RawStylusActions.cs
- ChildTable.cs
- X509InitiatorCertificateClientElement.cs
- LinqMaximalSubtreeNominator.cs
- EntityDataSourceChangingEventArgs.cs
- PathSegmentCollection.cs
- connectionpool.cs
- XmlTextAttribute.cs
- DataViewManager.cs
- DataGridColumnHeader.cs
- ControlCachePolicy.cs
- EdmToObjectNamespaceMap.cs
- InternalMappingException.cs
- TypeHelper.cs
- CompositeScriptReferenceEventArgs.cs
- WindowsStreamSecurityBindingElement.cs
- XXXInfos.cs
- PropertyCondition.cs