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
- EventQueueState.cs
- Type.cs
- Utils.cs
- Char.cs
- CalendarBlackoutDatesCollection.cs
- MenuAdapter.cs
- TypeDescriptorFilterService.cs
- LocalServiceSecuritySettingsElement.cs
- Point3D.cs
- TypePresenter.xaml.cs
- SoapCodeExporter.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- ComponentCollection.cs
- FigureHelper.cs
- SortedSet.cs
- SecurityTokenSpecification.cs
- Pair.cs
- TargetControlTypeCache.cs
- KnownBoxes.cs
- BlockUIContainer.cs
- WebPartEditorApplyVerb.cs
- DataGridViewCellStyleBuilderDialog.cs
- MetadataSection.cs
- TableLayoutCellPaintEventArgs.cs
- xml.cs
- BinaryHeap.cs
- ConfigXmlReader.cs
- DynamicDataResources.Designer.cs
- CipherData.cs
- Hashtable.cs
- TextAutomationPeer.cs
- safePerfProviderHandle.cs
- SqlDataSourceRefreshSchemaForm.cs
- InvalidTimeZoneException.cs
- XmlSchemaValidator.cs
- ImageBrush.cs
- TraceSwitch.cs
- LinqDataSourceSelectEventArgs.cs
- GeneralTransformCollection.cs
- ClickablePoint.cs
- TextServicesContext.cs
- IriParsingElement.cs
- ImagingCache.cs
- Exceptions.cs
- HttpPostedFileBase.cs
- EncodingDataItem.cs
- JavascriptXmlWriterWrapper.cs
- RNGCryptoServiceProvider.cs
- CharEnumerator.cs
- Brush.cs
- StaticFileHandler.cs
- EmptyTextWriter.cs
- ExtensionFile.cs
- Parallel.cs
- SoapIgnoreAttribute.cs
- WebControlsSection.cs
- XmlSigningNodeWriter.cs
- SoapFault.cs
- Label.cs
- WebPartCatalogCloseVerb.cs
- SamlAuthenticationStatement.cs
- CommonXSendMessage.cs
- ModuleConfigurationInfo.cs
- Label.cs
- ItemsPresenter.cs
- SqlDataSourceEnumerator.cs
- NamedServiceModelExtensionCollectionElement.cs
- Dispatcher.cs
- BitArray.cs
- PixelFormats.cs
- InternalConfigEventArgs.cs
- PenThreadPool.cs
- XmlConverter.cs
- SubMenuStyle.cs
- PeerTransportListenAddressValidator.cs
- SaveFileDialog.cs
- LayoutSettings.cs
- XmlIgnoreAttribute.cs
- ErasingStroke.cs
- Error.cs
- X509CertificateTokenFactoryCredential.cs
- ZipIOLocalFileBlock.cs
- Message.cs
- SingleAnimationBase.cs
- XmlAtomicValue.cs
- ScriptingRoleServiceSection.cs
- File.cs
- CursorInteropHelper.cs
- BasicViewGenerator.cs
- BitmapEffectDrawingContent.cs
- ListItemCollection.cs
- ConnectionOrientedTransportChannelFactory.cs
- HtmlInputFile.cs
- DescendantBaseQuery.cs
- UnsafeMethods.cs
- CodeCommentStatementCollection.cs
- SafeRightsManagementPubHandle.cs
- WebPartCloseVerb.cs
- WebPartTransformerCollection.cs
- PtsHelper.cs