Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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
- MouseButtonEventArgs.cs
- XMLSyntaxException.cs
- NetTcpBindingElement.cs
- PlanCompilerUtil.cs
- ResXBuildProvider.cs
- InfoCardRSAOAEPKeyExchangeFormatter.cs
- GradientStopCollection.cs
- CultureSpecificCharacterBufferRange.cs
- WebPartUtil.cs
- TransformProviderWrapper.cs
- RemotingService.cs
- ItemsPanelTemplate.cs
- ValidationPropertyAttribute.cs
- IDQuery.cs
- GlyphsSerializer.cs
- WebPartTransformerAttribute.cs
- FieldBuilder.cs
- LocatorBase.cs
- DoubleAnimation.cs
- AsymmetricSignatureFormatter.cs
- XmlQueryCardinality.cs
- SchemaElementLookUpTableEnumerator.cs
- Documentation.cs
- AliasGenerator.cs
- MasterPageBuildProvider.cs
- BaseCodeDomTreeGenerator.cs
- RSACryptoServiceProvider.cs
- UnmanagedBitmapWrapper.cs
- PrePrepareMethodAttribute.cs
- TypeSystemHelpers.cs
- SignatureToken.cs
- GroupBox.cs
- PackageRelationshipSelector.cs
- Dispatcher.cs
- ToolStripItemImageRenderEventArgs.cs
- VectorKeyFrameCollection.cs
- KeyValuePairs.cs
- shaperfactory.cs
- securitycriticaldataClass.cs
- AsymmetricSecurityProtocol.cs
- SpellerHighlightLayer.cs
- TableItemPattern.cs
- NamespaceQuery.cs
- SortFieldComparer.cs
- StylusPointPropertyInfo.cs
- AttachedAnnotation.cs
- ConfigXmlElement.cs
- ProxyGenerator.cs
- SwitchAttribute.cs
- JavaScriptString.cs
- PictureBox.cs
- Journal.cs
- SharedUtils.cs
- Block.cs
- WindowsAuthenticationEventArgs.cs
- DrawingGroupDrawingContext.cs
- XmlSchemaImporter.cs
- RTLAwareMessageBox.cs
- TextEditorSelection.cs
- RegistryDataKey.cs
- PenThreadWorker.cs
- UnauthorizedWebPart.cs
- UriParserTemplates.cs
- webproxy.cs
- Thread.cs
- InheritanceContextHelper.cs
- GlyphCache.cs
- CharStorage.cs
- DataServiceKeyAttribute.cs
- DataGridClipboardCellContent.cs
- DirectoryInfo.cs
- EventDescriptorCollection.cs
- CalloutQueueItem.cs
- ModifiableIteratorCollection.cs
- DetailsViewUpdatedEventArgs.cs
- odbcmetadatacolumnnames.cs
- TaskHelper.cs
- SystemUdpStatistics.cs
- PropertyMapper.cs
- SystemUdpStatistics.cs
- DateTimeOffsetStorage.cs
- Typography.cs
- OracleEncoding.cs
- AuthenticatedStream.cs
- EFTableProvider.cs
- StaticFileHandler.cs
- ConfigXmlCDataSection.cs
- PrintDialog.cs
- ChtmlTextWriter.cs
- HttpResponseHeader.cs
- TreeNodeBinding.cs
- CheckBoxFlatAdapter.cs
- ConnectionOrientedTransportManager.cs
- InvalidProgramException.cs
- PrintDialogException.cs
- Baml2006KnownTypes.cs
- DataRowChangeEvent.cs
- DictionaryBase.cs
- HttpFileCollection.cs
- ProfileInfo.cs