Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Reflection / Emit / StringToken.cs / 1305376 / StringToken.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: StringToken ** **[....] ** ** ** Purpose: Represents a String to the ILGenerator class. ** ** ===========================================================*/ namespace System.Reflection.Emit { using System; using System.Reflection; using System.Security.Permissions; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public struct StringToken { internal int m_string; //public StringToken() { // m_string=0; //} internal StringToken(int str) { m_string=str; } // Returns the metadata token for this particular string. // Generated by a call to Module.GetStringConstant(). // public int Token { get { return m_string; } } public override int GetHashCode() { return m_string; } public override bool Equals(Object obj) { if (obj is StringToken) return Equals((StringToken)obj); else return false; } public bool Equals(StringToken obj) { return obj.m_string == m_string; } public static bool operator ==(StringToken a, StringToken b) { return a.Equals(b); } public static bool operator !=(StringToken a, StringToken b) { return !(a == b); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Class: StringToken ** **[....] ** ** ** Purpose: Represents a String to the ILGenerator class. ** ** ===========================================================*/ namespace System.Reflection.Emit { using System; using System.Reflection; using System.Security.Permissions; [Serializable] [System.Runtime.InteropServices.ComVisible(true)] public struct StringToken { internal int m_string; //public StringToken() { // m_string=0; //} internal StringToken(int str) { m_string=str; } // Returns the metadata token for this particular string. // Generated by a call to Module.GetStringConstant(). // public int Token { get { return m_string; } } public override int GetHashCode() { return m_string; } public override bool Equals(Object obj) { if (obj is StringToken) return Equals((StringToken)obj); else return false; } public bool Equals(StringToken obj) { return obj.m_string == m_string; } public static bool operator ==(StringToken a, StringToken b) { return a.Equals(b); } public static bool operator !=(StringToken a, StringToken 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
- DataGridViewComboBoxColumn.cs
- ThreadStaticAttribute.cs
- ParameterReplacerVisitor.cs
- DesignerListAdapter.cs
- BaseTemplatedMobileComponentEditor.cs
- ContractListAdapter.cs
- ListViewUpdatedEventArgs.cs
- DataError.cs
- ToolStripTemplateNode.cs
- ModelItemDictionary.cs
- WebServiceAttribute.cs
- LogFlushAsyncResult.cs
- unsafeIndexingFilterStream.cs
- Camera.cs
- TextParentUndoUnit.cs
- Math.cs
- SoapInteropTypes.cs
- IdentityNotMappedException.cs
- TcpHostedTransportConfiguration.cs
- DataGridRow.cs
- mediaeventargs.cs
- _TransmitFileOverlappedAsyncResult.cs
- DbExpressionBuilder.cs
- TemplateKeyConverter.cs
- Message.cs
- CollectionEditorDialog.cs
- Models.cs
- IdentityValidationException.cs
- SqlSupersetValidator.cs
- ObjectListSelectEventArgs.cs
- FlowDocumentScrollViewerAutomationPeer.cs
- HtmlInputSubmit.cs
- DescendantBaseQuery.cs
- FixedHyperLink.cs
- DataGridViewElement.cs
- KeyFrames.cs
- SecurityContext.cs
- DeferredTextReference.cs
- ManagementObjectCollection.cs
- WSSecurityOneDotOneSendSecurityHeader.cs
- ToggleButton.cs
- BitmapData.cs
- NameValueFileSectionHandler.cs
- Type.cs
- WebPartTransformerCollection.cs
- WorkflowServiceAttributesTypeConverter.cs
- VerificationException.cs
- ForeignConstraint.cs
- _NTAuthentication.cs
- ValidatorUtils.cs
- PrintingPermissionAttribute.cs
- CompiledQueryCacheEntry.cs
- ContainsRowNumberChecker.cs
- SplitterEvent.cs
- XmlILIndex.cs
- FileEnumerator.cs
- XmlCharCheckingReader.cs
- SqlCacheDependency.cs
- HtmlTableRow.cs
- FunctionImportElement.cs
- ClonableStack.cs
- TextRangeAdaptor.cs
- PnrpPermission.cs
- SetterBaseCollection.cs
- BinaryConverter.cs
- SerialErrors.cs
- JournalEntryStack.cs
- TimeoutValidationAttribute.cs
- WebPartDescription.cs
- CookieProtection.cs
- ActivationArguments.cs
- TreeBuilder.cs
- configsystem.cs
- QilInvokeEarlyBound.cs
- StylusCaptureWithinProperty.cs
- ErrorHandlerModule.cs
- XmlDataSource.cs
- EntityAdapter.cs
- FormViewInsertEventArgs.cs
- ContainerUIElement3D.cs
- ResolveMatchesCD1.cs
- XmlSchemaAttribute.cs
- ApplicationContext.cs
- DataBoundLiteralControl.cs
- oledbmetadatacolumnnames.cs
- ButtonChrome.cs
- CachedBitmap.cs
- HttpListenerResponse.cs
- EncoderNLS.cs
- MemberAccessException.cs
- Queue.cs
- DbProviderConfigurationHandler.cs
- MultiTrigger.cs
- XmlProcessingInstruction.cs
- InstancePersistenceEvent.cs
- SHA1Managed.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- DeviceContext2.cs
- LocatorBase.cs
- DataPagerFieldItem.cs