Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- FontNamesConverter.cs
- handlecollector.cs
- ResourceDescriptionAttribute.cs
- NativeMethods.cs
- StructuredType.cs
- DataGridViewSelectedCellsAccessibleObject.cs
- CultureTableRecord.cs
- ConstrainedGroup.cs
- EventProvider.cs
- FrameDimension.cs
- BindingNavigator.cs
- EnumMember.cs
- DependencyPropertyDescriptor.cs
- ResXResourceSet.cs
- SpecialNameAttribute.cs
- VirtualPath.cs
- ContractBase.cs
- ActivityCodeDomReferenceService.cs
- UnsupportedPolicyOptionsException.cs
- TextEditorSelection.cs
- AssemblyBuilder.cs
- DataControlFieldHeaderCell.cs
- GeneralTransform2DTo3D.cs
- ScrollPattern.cs
- AcceptorSessionSymmetricTransportSecurityProtocol.cs
- XsltQilFactory.cs
- NumberSubstitution.cs
- SmiGettersStream.cs
- PreviewKeyDownEventArgs.cs
- ClientRuntimeConfig.cs
- CheckBoxList.cs
- FormViewPageEventArgs.cs
- ControlType.cs
- BamlLocalizationDictionary.cs
- BindingWorker.cs
- MethodExpr.cs
- ObjectItemNoOpAssemblyLoader.cs
- DataTablePropertyDescriptor.cs
- MissingSatelliteAssemblyException.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- CommandTreeTypeHelper.cs
- AsnEncodedData.cs
- DrawingGroup.cs
- PingOptions.cs
- LogicalExpr.cs
- TreeViewDesigner.cs
- FontWeights.cs
- IResourceProvider.cs
- ConfigurationElementCollection.cs
- XmlSchemaAttributeGroupRef.cs
- KnownBoxes.cs
- ToggleProviderWrapper.cs
- BlurBitmapEffect.cs
- DataPager.cs
- SiteMapNode.cs
- WebEncodingValidatorAttribute.cs
- IApplicationTrustManager.cs
- ReaderWriterLockSlim.cs
- Helpers.cs
- BamlRecords.cs
- OleDbPermission.cs
- XmlSortKey.cs
- _NetworkingPerfCounters.cs
- CodeDirectiveCollection.cs
- AddInControllerImpl.cs
- VectorValueSerializer.cs
- PropertyDescriptorCollection.cs
- DataGridTablesFactory.cs
- AppDomainManager.cs
- XmlWriterTraceListener.cs
- SchemaNotation.cs
- SmtpTransport.cs
- WorkflowRequestContext.cs
- InvalidProgramException.cs
- FixedSOMLineCollection.cs
- HtmlTableRowCollection.cs
- IncrementalCompileAnalyzer.cs
- DynamicMethod.cs
- ListItemCollection.cs
- SafeArrayRankMismatchException.cs
- MaskDescriptors.cs
- MasterPageBuildProvider.cs
- SourceInterpreter.cs
- SerialErrors.cs
- ToolboxComponentsCreatedEventArgs.cs
- _NetworkingPerfCounters.cs
- _KerberosClient.cs
- MaskDescriptor.cs
- SettingsPropertyWrongTypeException.cs
- BamlStream.cs
- InsufficientMemoryException.cs
- LateBoundChannelParameterCollection.cs
- EncoderBestFitFallback.cs
- ParallelTimeline.cs
- DecimalConstantAttribute.cs
- SplayTreeNode.cs
- DynamicDataResources.Designer.cs
- DbTransaction.cs
- MediaTimeline.cs
- TextRangeProviderWrapper.cs