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
- SmiContext.cs
- PagesChangedEventArgs.cs
- Config.cs
- InsufficientMemoryException.cs
- MetafileHeader.cs
- SafeArrayRankMismatchException.cs
- figurelength.cs
- BamlResourceContent.cs
- UnmanagedHandle.cs
- RoleBoolean.cs
- ResourceContainer.cs
- DbConnectionPoolOptions.cs
- Roles.cs
- TileBrush.cs
- ExternalException.cs
- SoapCodeExporter.cs
- listitem.cs
- Transactions.cs
- DynamicDataManager.cs
- CommandManager.cs
- X509Extension.cs
- StorageSetMapping.cs
- ViewStateModeByIdAttribute.cs
- SiteMapPath.cs
- SliderAutomationPeer.cs
- DataSet.cs
- x509store.cs
- Vector3DAnimation.cs
- NullRuntimeConfig.cs
- ProcessProtocolHandler.cs
- ProtocolsSection.cs
- ProfilePropertySettingsCollection.cs
- DependencyObjectValidator.cs
- MobileComponentEditorPage.cs
- Queue.cs
- KeyedHashAlgorithm.cs
- NativeObjectSecurity.cs
- InvokePatternIdentifiers.cs
- RecognizeCompletedEventArgs.cs
- XsdBuildProvider.cs
- CodeComment.cs
- MessagingActivityHelper.cs
- GridViewColumnCollection.cs
- VariableAction.cs
- EndpointDesigner.cs
- CoreChannel.cs
- AnnouncementEndpoint.cs
- SID.cs
- InvokeMethodActivity.cs
- ReadOnlyDataSource.cs
- LocalizationParserHooks.cs
- DPCustomTypeDescriptor.cs
- Bidi.cs
- AttachedPropertyBrowsableWhenAttributePresentAttribute.cs
- ComIntegrationManifestGenerator.cs
- FilteredXmlReader.cs
- UInt64Storage.cs
- Ticks.cs
- NumberFormatInfo.cs
- RemoteWebConfigurationHostServer.cs
- X509Certificate.cs
- XmlSerializerOperationBehavior.cs
- XmlSchemaDocumentation.cs
- MediaContext.cs
- BitmapDecoder.cs
- PersonalizationStateInfoCollection.cs
- GenerateTemporaryAssemblyTask.cs
- CodeGenerator.cs
- ACL.cs
- Cursor.cs
- CustomTypeDescriptor.cs
- XmlWrappingWriter.cs
- SQLDecimalStorage.cs
- Events.cs
- WebCategoryAttribute.cs
- Point3DAnimationUsingKeyFrames.cs
- DbMetaDataColumnNames.cs
- ECDsa.cs
- BitmapEffectOutputConnector.cs
- TraceRecord.cs
- PersonalizationStateInfoCollection.cs
- TreeViewHitTestInfo.cs
- AdjustableArrowCap.cs
- SessionStateModule.cs
- PageVisual.cs
- CqlParserHelpers.cs
- Image.cs
- SQLGuid.cs
- Property.cs
- LocalizableAttribute.cs
- CfgParser.cs
- FirewallWrapper.cs
- ObjectDataSourceView.cs
- ScriptingScriptResourceHandlerSection.cs
- ASCIIEncoding.cs
- Compensate.cs
- FamilyMapCollection.cs
- UnsafeNativeMethodsPenimc.cs
- ConfigurationPermission.cs
- RegexMatchCollection.cs