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
- SelectionRange.cs
- TimeSpanMinutesOrInfiniteConverter.cs
- CodeMethodInvokeExpression.cs
- ExceptionHelpers.cs
- IndentTextWriter.cs
- CompensateDesigner.cs
- BamlBinaryWriter.cs
- ProxyManager.cs
- ActiveXHost.cs
- ComponentResourceKey.cs
- Vector3DConverter.cs
- IfAction.cs
- ActivityExecutor.cs
- IPEndPoint.cs
- HttpSessionStateBase.cs
- MessageBox.cs
- SHA1Managed.cs
- LinqDataSourceValidationException.cs
- XmlNotation.cs
- SchemaComplexType.cs
- SizeConverter.cs
- TextTreeText.cs
- FontFamily.cs
- WebPartActionVerb.cs
- XNodeValidator.cs
- SequentialActivityDesigner.cs
- PrintDialogException.cs
- HighlightComponent.cs
- EventLogPermissionEntry.cs
- XmlSerializableReader.cs
- LookupNode.cs
- XamlStream.cs
- Setter.cs
- IndexerNameAttribute.cs
- MetabaseSettings.cs
- BooleanKeyFrameCollection.cs
- StateMachine.cs
- InternalsVisibleToAttribute.cs
- ToolStripProgressBar.cs
- SecurityContextKeyIdentifierClause.cs
- SafeRightsManagementQueryHandle.cs
- RtfControlWordInfo.cs
- FontSource.cs
- EntityDataSourceDesigner.cs
- Int16KeyFrameCollection.cs
- WebPartActionVerb.cs
- FileDialog.cs
- EncoderReplacementFallback.cs
- GlyphsSerializer.cs
- WeakReadOnlyCollection.cs
- SafeCryptContextHandle.cs
- DeferredReference.cs
- Compiler.cs
- Reference.cs
- XmlSchemaObjectTable.cs
- InsufficientMemoryException.cs
- OrderByQueryOptionExpression.cs
- DataGridTableCollection.cs
- WpfKnownMember.cs
- InputManager.cs
- CannotUnloadAppDomainException.cs
- DataGridColumnHeader.cs
- XmlComplianceUtil.cs
- PenCursorManager.cs
- TemplateBaseAction.cs
- MultiSelectRootGridEntry.cs
- AssemblyFilter.cs
- BindingMAnagerBase.cs
- StartFileNameEditor.cs
- ItemContainerGenerator.cs
- Drawing.cs
- Stack.cs
- RowSpanVector.cs
- DesignerOptionService.cs
- HtmlMobileTextWriter.cs
- SafeNativeMethods.cs
- DataRowComparer.cs
- AnnotationMap.cs
- EventRoute.cs
- GregorianCalendarHelper.cs
- Stylesheet.cs
- ToolTipAutomationPeer.cs
- RowToParametersTransformer.cs
- CardSpacePolicyElement.cs
- DateTimeFormat.cs
- ClientApiGenerator.cs
- ResourceFallbackManager.cs
- DrawToolTipEventArgs.cs
- MergeEnumerator.cs
- AttributeCollection.cs
- TdsParameterSetter.cs
- StopStoryboard.cs
- arabicshape.cs
- DynamicUpdateCommand.cs
- GenericTextProperties.cs
- NoneExcludedImageIndexConverter.cs
- WinOEToolBoxItem.cs
- Bitmap.cs
- Panel.cs
- XmlAttribute.cs