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
- DocumentPageView.cs
- StaticExtension.cs
- TrustSection.cs
- dsa.cs
- DockPattern.cs
- HttpListenerPrefixCollection.cs
- Tile.cs
- TdsParserStateObject.cs
- SamlAction.cs
- MarkupCompilePass2.cs
- MDIClient.cs
- HTTPNotFoundHandler.cs
- DataGridToolTip.cs
- CodeRegionDirective.cs
- SQLInt64.cs
- ValidationPropertyAttribute.cs
- GeometryCombineModeValidation.cs
- ReadOnlyObservableCollection.cs
- TypeDependencyAttribute.cs
- TimeStampChecker.cs
- FormViewPagerRow.cs
- ArrayConverter.cs
- DataSourceControl.cs
- BamlVersionHeader.cs
- NativeMethods.cs
- SHA384Managed.cs
- HwndHostAutomationPeer.cs
- DrawItemEvent.cs
- SignedXml.cs
- ManipulationDelta.cs
- CompilerTypeWithParams.cs
- GenerateHelper.cs
- SystemIPAddressInformation.cs
- OleDbParameterCollection.cs
- UIntPtr.cs
- DependencyPropertyHelper.cs
- AuthenticationService.cs
- TraceHandlerErrorFormatter.cs
- PathNode.cs
- DateTimeConstantAttribute.cs
- ApplicationSecurityInfo.cs
- AdapterSwitches.cs
- NativeMethods.cs
- BitmapEffectInputData.cs
- FilteredReadOnlyMetadataCollection.cs
- SqlUserDefinedTypeAttribute.cs
- ActivationArguments.cs
- HttpBrowserCapabilitiesWrapper.cs
- Workspace.cs
- MenuItemBinding.cs
- SizeChangedEventArgs.cs
- ObjectItemNoOpAssemblyLoader.cs
- MatrixTransform.cs
- DataGridViewRowConverter.cs
- RequestUriProcessor.cs
- ToolStripItemTextRenderEventArgs.cs
- CustomSignedXml.cs
- PermissionListSet.cs
- NonBatchDirectoryCompiler.cs
- KeySpline.cs
- CollectionBuilder.cs
- HttpClientCertificate.cs
- ValueTypeFieldReference.cs
- SqlDataSourceCommandEventArgs.cs
- MonthChangedEventArgs.cs
- BindingUtils.cs
- ToolboxItemCollection.cs
- SqlTypesSchemaImporter.cs
- FactoryGenerator.cs
- BeginEvent.cs
- SoapTypeAttribute.cs
- itemelement.cs
- DBSchemaRow.cs
- GridViewAutomationPeer.cs
- EntityDataSourceState.cs
- SevenBitStream.cs
- LayoutInformation.cs
- TextTreeTextElementNode.cs
- HttpCacheVaryByContentEncodings.cs
- X509Extension.cs
- ContentTextAutomationPeer.cs
- JsonQNameDataContract.cs
- DataGridRelationshipRow.cs
- InvalidContentTypeException.cs
- SerializationAttributes.cs
- CuspData.cs
- StylusLogic.cs
- UserControlParser.cs
- GridToolTip.cs
- ZipArchive.cs
- CodeBlockBuilder.cs
- PositiveTimeSpanValidatorAttribute.cs
- DBSqlParserTable.cs
- XmlMembersMapping.cs
- Mapping.cs
- AssertSection.cs
- WindowCollection.cs
- ExecutedRoutedEventArgs.cs
- X509ClientCertificateCredentialsElement.cs
- ProtocolsSection.cs