Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Reflection / Emit / FieldToken.cs / 1 / FieldToken.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: FieldToken ** ** ** Purpose: Represents a Field to the ILGenerator Class ** ** ===========================================================*/ namespace System.Reflection.Emit { using System; using System.Reflection; using System.Security.Permissions; // The FieldToken class is an opaque representation of the Token returned // by the Metadata to represent the field. FieldTokens are generated by // Module.GetFieldToken(). There are no meaningful accessors on this class, // but it can be passed to ILGenerator which understands it's internals. [Serializable()] [System.Runtime.InteropServices.ComVisible(true)] public struct FieldToken { public static readonly FieldToken Empty = new FieldToken(); internal int m_fieldTok; internal Object m_class; // Creates an empty FieldToken. A publicly visible constructor so that // it can be created on the stack. //public FieldToken() { // m_fieldTok=0; // m_attributes=0; // m_class=null; //} // The actual constructor. Sets the field, attributes and class // variables internal FieldToken (int field, Type fieldClass) { m_fieldTok=field; m_class = fieldClass; } public int Token { get { return m_fieldTok; } } // Generates the hash code for this field. public override int GetHashCode() { return (m_fieldTok); } // Returns true if obj is an instance of FieldToken and is // equal to this instance. public override bool Equals(Object obj) { if (obj is FieldToken) return Equals((FieldToken)obj); else return false; } public bool Equals(FieldToken obj) { return obj.m_fieldTok == m_fieldTok && obj.m_class == m_class; } public static bool operator ==(FieldToken a, FieldToken b) { return a.Equals(b); } public static bool operator !=(FieldToken a, FieldToken b) { return !(a == b); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConnectionPointCookie.cs
- CodeLabeledStatement.cs
- DependencyObject.cs
- TimeSpanConverter.cs
- BackgroundFormatInfo.cs
- storepermission.cs
- ExtenderProvidedPropertyAttribute.cs
- CompositeDataBoundControl.cs
- DataGridViewColumnConverter.cs
- ComponentChangedEvent.cs
- SparseMemoryStream.cs
- SQLMoneyStorage.cs
- HtmlTableRowCollection.cs
- PngBitmapEncoder.cs
- GroupedContextMenuStrip.cs
- ADConnectionHelper.cs
- ListViewInsertedEventArgs.cs
- DataGridViewCellConverter.cs
- XmlAnyAttributeAttribute.cs
- Grid.cs
- LZCodec.cs
- AnimationClockResource.cs
- WebPartZoneCollection.cs
- APCustomTypeDescriptor.cs
- ExtendedPropertyInfo.cs
- SyndicationFeed.cs
- ListViewItem.cs
- X509Certificate.cs
- DataPointer.cs
- PrincipalPermission.cs
- unsafenativemethodsother.cs
- FontUnit.cs
- SetterBase.cs
- XPathAxisIterator.cs
- DocumentViewer.cs
- EventOpcode.cs
- VideoDrawing.cs
- TypeElementCollection.cs
- BitmapEffectOutputConnector.cs
- ComplexObject.cs
- TextPointerBase.cs
- SourceFileBuildProvider.cs
- RowSpanVector.cs
- ResolveResponse.cs
- InfoCardRSACryptoProvider.cs
- ApplicationId.cs
- HttpApplication.cs
- MetadataItem.cs
- WorkflowMarkupSerializer.cs
- SqlReorderer.cs
- SqlTriggerContext.cs
- BitmapEffectRenderDataResource.cs
- Package.cs
- PersonalizationStateInfo.cs
- XmlSchemaChoice.cs
- SafeFileMapViewHandle.cs
- DependsOnAttribute.cs
- ArraySubsetEnumerator.cs
- Int32KeyFrameCollection.cs
- XDeferredAxisSource.cs
- CodeTypeMember.cs
- SimpleBitVector32.cs
- CssTextWriter.cs
- BindingValueChangedEventArgs.cs
- HelpExampleGenerator.cs
- EntityTransaction.cs
- EncoderExceptionFallback.cs
- DependencyObjectPropertyDescriptor.cs
- StylusCaptureWithinProperty.cs
- WebPartDescriptionCollection.cs
- WindowsScrollBar.cs
- TdsParserStaticMethods.cs
- DispatcherObject.cs
- WebBrowserBase.cs
- ModelVisual3D.cs
- DebugHandleTracker.cs
- NavigationWindow.cs
- GradientBrush.cs
- WebPartDeleteVerb.cs
- UrlAuthorizationModule.cs
- ClockController.cs
- Application.cs
- ProviderBase.cs
- CodePrimitiveExpression.cs
- ProcessModelSection.cs
- _SslState.cs
- Splitter.cs
- XmlSchemaAll.cs
- XamlToRtfWriter.cs
- BitmapSource.cs
- JournalEntryStack.cs
- OracleRowUpdatedEventArgs.cs
- ImageCodecInfo.cs
- Win32Native.cs
- OrthographicCamera.cs
- XmlDesignerDataSourceView.cs
- CommandEventArgs.cs
- PointLight.cs
- NamedPipeDuplicateContext.cs
- XmlElementAttributes.cs