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
- SystemResourceHost.cs
- NavigationPropertyEmitter.cs
- BitmapEncoder.cs
- ListBoxAutomationPeer.cs
- OleCmdHelper.cs
- mactripleDES.cs
- HtmlSelect.cs
- Transform3D.cs
- XmlSerializationWriter.cs
- GridProviderWrapper.cs
- Attachment.cs
- MultipartContentParser.cs
- DataGridViewHitTestInfo.cs
- InArgument.cs
- ObfuscationAttribute.cs
- RegexCode.cs
- Hashtable.cs
- RangeValidator.cs
- UnwrappedTypesXmlSerializerManager.cs
- SaveWorkflowCommand.cs
- HostingEnvironmentSection.cs
- TaiwanCalendar.cs
- ItemsPanelTemplate.cs
- ReferenceEqualityComparer.cs
- JoinSymbol.cs
- DataGridViewMethods.cs
- XamlGridLengthSerializer.cs
- EntitySet.cs
- SqlMethodCallConverter.cs
- XmlAttributeAttribute.cs
- ControlAdapter.cs
- FusionWrap.cs
- FormViewInsertedEventArgs.cs
- nulltextcontainer.cs
- KnownTypeHelper.cs
- EventProviderWriter.cs
- ResponseStream.cs
- InputProviderSite.cs
- Point3DAnimationUsingKeyFrames.cs
- AspNetCompatibilityRequirementsAttribute.cs
- CodePrimitiveExpression.cs
- ExeContext.cs
- PasswordTextContainer.cs
- ServicesExceptionNotHandledEventArgs.cs
- ValidatedControlConverter.cs
- DataControlFieldsEditor.cs
- CssStyleCollection.cs
- ClientUtils.cs
- ThrowOnMultipleAssignment.cs
- InternalDuplexChannelFactory.cs
- AutomationElementIdentifiers.cs
- ContentDefinition.cs
- TreeViewImageKeyConverter.cs
- IisTraceWebEventProvider.cs
- CodeConstructor.cs
- TransformConverter.cs
- ApplicationContext.cs
- columnmapfactory.cs
- DataTableNewRowEvent.cs
- NumberFormatter.cs
- WindowsButton.cs
- ProtocolViolationException.cs
- TextEditorLists.cs
- HtmlShim.cs
- FamilyTypeface.cs
- GridViewHeaderRowPresenter.cs
- DataTableMappingCollection.cs
- _AutoWebProxyScriptEngine.cs
- SerializationIncompleteException.cs
- WebPartEditorCancelVerb.cs
- StrokeCollection.cs
- TransportationConfigurationTypeInstallComponent.cs
- Oid.cs
- controlskin.cs
- UpdateCompiler.cs
- ObjectDataSourceDisposingEventArgs.cs
- XpsS0ValidatingLoader.cs
- DropDownList.cs
- ThaiBuddhistCalendar.cs
- ToolStripItem.cs
- SoapCodeExporter.cs
- InvariantComparer.cs
- SafePEFileHandle.cs
- SchemaType.cs
- ListBindingConverter.cs
- Int64Converter.cs
- Cursors.cs
- ZipIOLocalFileHeader.cs
- COM2IDispatchConverter.cs
- Size3D.cs
- SchemaManager.cs
- SoundPlayer.cs
- XamlReader.cs
- _WebProxyDataBuilder.cs
- NonBatchDirectoryCompiler.cs
- IriParsingElement.cs
- ServiceContractListItemList.cs
- RegexCompiler.cs
- BooleanSwitch.cs
- AutomationPatternInfo.cs