Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- AuthStoreRoleProvider.cs
- XmlBoundElement.cs
- GAC.cs
- DesignerActionItem.cs
- ExceptionHandlersDesigner.cs
- EnumValidator.cs
- WindowsTokenRoleProvider.cs
- Literal.cs
- DataGridViewTopRowAccessibleObject.cs
- EntityStoreSchemaFilterEntry.cs
- odbcmetadatafactory.cs
- Border.cs
- XsltConvert.cs
- MetaForeignKeyColumn.cs
- EdgeModeValidation.cs
- PrinterUnitConvert.cs
- DocumentOutline.cs
- BitConverter.cs
- DataObjectAttribute.cs
- FtpWebRequest.cs
- ping.cs
- ModelPropertyDescriptor.cs
- Activation.cs
- ContextMarshalException.cs
- MachineKeySection.cs
- BindingList.cs
- ActivityValidationServices.cs
- XMLSchema.cs
- BulletedList.cs
- ISCIIEncoding.cs
- SoundPlayerAction.cs
- ObjectDataSourceSelectingEventArgs.cs
- PermissionToken.cs
- ObjectDisposedException.cs
- UserPreferenceChangedEventArgs.cs
- DataGridViewButtonCell.cs
- AttributeQuery.cs
- DesignerCommandSet.cs
- DataGridItemCollection.cs
- Buffer.cs
- EditorAttribute.cs
- AnonymousIdentificationModule.cs
- ProfilePropertySettingsCollection.cs
- ToolStripRenderEventArgs.cs
- ISAPIWorkerRequest.cs
- CommonDialog.cs
- BasicDesignerLoader.cs
- CodePageUtils.cs
- IpcClientChannel.cs
- control.ime.cs
- ClientSession.cs
- BufferBuilder.cs
- BitmapCodecInfoInternal.cs
- ProgressBarBrushConverter.cs
- XmlChildNodes.cs
- UnsafeNativeMethods.cs
- XamlTemplateSerializer.cs
- LinkLabelLinkClickedEvent.cs
- SharedPerformanceCounter.cs
- CustomAttributeSerializer.cs
- XhtmlTextWriter.cs
- ClassImporter.cs
- PropertyFilter.cs
- UnsafeNativeMethods.cs
- TextBounds.cs
- WeakHashtable.cs
- TableAutomationPeer.cs
- SafeIUnknown.cs
- LostFocusEventManager.cs
- MouseButtonEventArgs.cs
- TextElementEnumerator.cs
- ControlParameter.cs
- EdmScalarPropertyAttribute.cs
- HwndProxyElementProvider.cs
- ToolBar.cs
- PkcsMisc.cs
- InfoCardProofToken.cs
- FolderBrowserDialog.cs
- ToolStripContentPanel.cs
- MD5.cs
- ObjectListCommandsPage.cs
- ScriptingAuthenticationServiceSection.cs
- AttachedPropertyBrowsableAttribute.cs
- _HTTPDateParse.cs
- ArraySegment.cs
- SizeConverter.cs
- ClientConvert.cs
- HttpValueCollection.cs
- ToolboxItemCollection.cs
- ErrorFormatter.cs
- GridViewAutoFormat.cs
- CollectionDataContractAttribute.cs
- PassportAuthentication.cs
- PreviewPrintController.cs
- FollowerQueueCreator.cs
- XmlILTrace.cs
- TagMapCollection.cs
- TypeDelegator.cs
- DelegatingConfigHost.cs
- XPathDocument.cs