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
- WriteableBitmap.cs
- ToggleButtonAutomationPeer.cs
- LightweightEntityWrapper.cs
- SqlCacheDependencyDatabaseCollection.cs
- selecteditemcollection.cs
- HostingEnvironmentException.cs
- AstTree.cs
- LinqDataSourceDisposeEventArgs.cs
- ContentOperations.cs
- DefaultProxySection.cs
- DbParameterCollectionHelper.cs
- SimpleParser.cs
- MessageSecurityException.cs
- AnnotationHighlightLayer.cs
- XmlJsonWriter.cs
- RoleManagerModule.cs
- TraceLevelStore.cs
- PublishLicense.cs
- SecurityPolicySection.cs
- ApplicationCommands.cs
- DesignerVerbCollection.cs
- TextDecorationCollection.cs
- ObjectPersistData.cs
- ToolTipService.cs
- WindowsPrincipal.cs
- InstanceKey.cs
- LeftCellWrapper.cs
- QuerySelectOp.cs
- DateTimeConverter.cs
- AnimationClockResource.cs
- sqlmetadatafactory.cs
- ControlCachePolicy.cs
- NameValueConfigurationElement.cs
- ObjectSecurity.cs
- GraphicsPath.cs
- Debug.cs
- RequestTimeoutManager.cs
- MultiTouchSystemGestureLogic.cs
- WindowShowOrOpenTracker.cs
- BindingSource.cs
- ACE.cs
- TextElementEnumerator.cs
- ContainerUIElement3D.cs
- IncrementalHitTester.cs
- DurableErrorHandler.cs
- DataRowExtensions.cs
- TextTreeExtractElementUndoUnit.cs
- HeaderCollection.cs
- DataGridViewAutoSizeColumnsModeEventArgs.cs
- EventEntry.cs
- HtmlButton.cs
- LassoHelper.cs
- EdmProperty.cs
- JournalEntryListConverter.cs
- ListViewInsertionMark.cs
- RepeaterItemCollection.cs
- ListManagerBindingsCollection.cs
- Parser.cs
- PersonalizableTypeEntry.cs
- DockingAttribute.cs
- DoubleLinkListEnumerator.cs
- ConfigurationManagerInternal.cs
- XmlRootAttribute.cs
- CellCreator.cs
- ProtocolsSection.cs
- PathSegmentCollection.cs
- oledbmetadatacolumnnames.cs
- ThemeableAttribute.cs
- WindowsSpinner.cs
- PerformanceCountersElement.cs
- UxThemeWrapper.cs
- Pen.cs
- X509Certificate2Collection.cs
- InsufficientMemoryException.cs
- WindowsSolidBrush.cs
- MsmqMessage.cs
- DataGridViewSelectedCellCollection.cs
- AssociationSetEnd.cs
- WebBrowserPermission.cs
- XamlToRtfWriter.cs
- ToolStripOverflowButton.cs
- PropertyMap.cs
- Currency.cs
- ChtmlTextWriter.cs
- ElementAction.cs
- WindowsFormsEditorServiceHelper.cs
- Expr.cs
- PoisonMessageException.cs
- StorageSetMapping.cs
- BaseComponentEditor.cs
- OleDbSchemaGuid.cs
- ToolStripLocationCancelEventArgs.cs
- FolderNameEditor.cs
- SQLBytes.cs
- Clipboard.cs
- Typeface.cs
- Material.cs
- SortFieldComparer.cs
- QueryFunctions.cs
- TableLayoutCellPaintEventArgs.cs