Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / 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); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- StatusBarPanelClickEvent.cs
- Transform.cs
- StyleHelper.cs
- ThreadStateException.cs
- OpCopier.cs
- MSAANativeProvider.cs
- SecurityUtils.cs
- FixedSOMElement.cs
- InvalidOleVariantTypeException.cs
- ChameleonKey.cs
- TextTreeInsertUndoUnit.cs
- ViewSimplifier.cs
- WindowsListViewScroll.cs
- mediaeventshelper.cs
- DeclarativeConditionsCollection.cs
- Style.cs
- KeyTimeConverter.cs
- SqlFunctions.cs
- VoiceInfo.cs
- SecurityTokenException.cs
- CompoundFileDeflateTransform.cs
- DecoderBestFitFallback.cs
- ToolBarButtonClickEvent.cs
- BuildManagerHost.cs
- DynamicMethod.cs
- CallTemplateAction.cs
- PackageFilter.cs
- TableRowGroup.cs
- NetworkInformationException.cs
- ObjectStateEntry.cs
- ListItemCollection.cs
- TextEndOfParagraph.cs
- Schema.cs
- RecognizedAudio.cs
- HTTPNotFoundHandler.cs
- ContextMenuAutomationPeer.cs
- SemanticResolver.cs
- ValidationPropertyAttribute.cs
- BitmapSource.cs
- path.cs
- FirstMatchCodeGroup.cs
- KerberosSecurityTokenAuthenticator.cs
- Brush.cs
- XPathCompileException.cs
- StagingAreaInputItem.cs
- MouseOverProperty.cs
- ComAwareEventInfo.cs
- FocusTracker.cs
- MetadataItemEmitter.cs
- CodeDirectionExpression.cs
- CodeIdentifier.cs
- ColorIndependentAnimationStorage.cs
- SqlProcedureAttribute.cs
- ContentFileHelper.cs
- SynchronousChannelMergeEnumerator.cs
- UIElementParaClient.cs
- XmlReflectionMember.cs
- mediaclock.cs
- Int32Rect.cs
- IISMapPath.cs
- CodeCompileUnit.cs
- UserControlCodeDomTreeGenerator.cs
- SQLInt16.cs
- X509Utils.cs
- SqlRetyper.cs
- SiteMapDataSourceView.cs
- Rectangle.cs
- Util.cs
- PageBreakRecord.cs
- SchemaMapping.cs
- Transform3D.cs
- DataGridViewUtilities.cs
- Control.cs
- CodeRegionDirective.cs
- DtdParser.cs
- Misc.cs
- Region.cs
- FilteredDataSetHelper.cs
- CollectionViewSource.cs
- Parallel.cs
- DrawingAttributes.cs
- XomlSerializationHelpers.cs
- ElementProxy.cs
- SqlClientWrapperSmiStream.cs
- MarshalByValueComponent.cs
- ellipse.cs
- ConfigXmlText.cs
- DrawingVisualDrawingContext.cs
- ViewPort3D.cs
- ChtmlTextWriter.cs
- BinaryFormatter.cs
- CellIdBoolean.cs
- BooleanSwitch.cs
- Int32.cs
- WebPartCatalogCloseVerb.cs
- RepeatButtonAutomationPeer.cs
- XmlDataContract.cs
- CancelRequestedQuery.cs
- EntityType.cs
- ApplicationFileParser.cs