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
- DateRangeEvent.cs
- XmlMessageFormatter.cs
- Helpers.cs
- DynamicPropertyReader.cs
- IgnoreDeviceFilterElement.cs
- COMException.cs
- CroppedBitmap.cs
- CompressedStack.cs
- IDispatchConstantAttribute.cs
- HtmlButton.cs
- IntranetCredentialPolicy.cs
- Invariant.cs
- ImageField.cs
- AuthenticationModuleElementCollection.cs
- WsatServiceCertificate.cs
- MultiBinding.cs
- _HeaderInfoTable.cs
- Expression.cs
- FlowPosition.cs
- ServicePointManager.cs
- SecurityChannelFaultConverter.cs
- ArglessEventHandlerProxy.cs
- DbTypeMap.cs
- BindingCompleteEventArgs.cs
- MarkupProperty.cs
- CodeDirectiveCollection.cs
- AsyncResult.cs
- ObfuscationAttribute.cs
- OdbcDataReader.cs
- ConfigXmlDocument.cs
- IisTraceWebEventProvider.cs
- OdbcDataReader.cs
- AccessibilityHelperForXpWin2k3.cs
- RSAPKCS1KeyExchangeFormatter.cs
- DesignerLoader.cs
- DaylightTime.cs
- XDeferredAxisSource.cs
- ErrorStyle.cs
- DataBoundControlHelper.cs
- TraceHandlerErrorFormatter.cs
- CalloutQueueItem.cs
- FileBasedResourceGroveler.cs
- UserControl.cs
- DetailsView.cs
- FileSecurity.cs
- BinaryVersion.cs
- MarkerProperties.cs
- JournalNavigationScope.cs
- ScopelessEnumAttribute.cs
- ActivityMarkupSerializer.cs
- ToolStripPanelRenderEventArgs.cs
- TypefaceMetricsCache.cs
- TypeConverterAttribute.cs
- MarshalByRefObject.cs
- ParallelTimeline.cs
- Converter.cs
- PeerReferralPolicy.cs
- FileNameEditor.cs
- control.ime.cs
- CreateUserErrorEventArgs.cs
- FrugalList.cs
- Size3D.cs
- TextLine.cs
- DataGridRelationshipRow.cs
- EnumValidator.cs
- recordstate.cs
- TextEditorParagraphs.cs
- BrowserCapabilitiesFactory35.cs
- ServiceBehaviorElement.cs
- DependencySource.cs
- SourceFileBuildProvider.cs
- DataGridViewToolTip.cs
- TdsParameterSetter.cs
- AspNetHostingPermission.cs
- BoundField.cs
- DataViewManager.cs
- WebBrowserEvent.cs
- SrgsToken.cs
- SynchronizedDispatch.cs
- DummyDataSource.cs
- XmlSchemaAttribute.cs
- Vector.cs
- ExceptionUtil.cs
- StylusCollection.cs
- HtmlInputImage.cs
- QuaternionRotation3D.cs
- BooleanFunctions.cs
- XPathNodeIterator.cs
- TextRangeEditLists.cs
- WebServiceTypeData.cs
- InteropBitmapSource.cs
- ComponentChangedEvent.cs
- RelationshipEnd.cs
- FileVersion.cs
- Lock.cs
- Viewport3DAutomationPeer.cs
- EntityTypeBase.cs
- util.cs
- FastEncoderStatics.cs
- DrawTreeNodeEventArgs.cs