Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / clr / src / BCL / System / Reflection / Emit / StringToken.cs / 1 / 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);
}
}
}
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AppDomainAttributes.cs
- TextTreePropertyUndoUnit.cs
- TreeNode.cs
- ReceiveMessageRecord.cs
- StateManagedCollection.cs
- ComponentChangedEvent.cs
- BrowserDefinitionCollection.cs
- ObjectAssociationEndMapping.cs
- HyperlinkAutomationPeer.cs
- ToolStripContainer.cs
- XmlTypeAttribute.cs
- DataSvcMapFile.cs
- HMACSHA1.cs
- DefaultHttpHandler.cs
- LockedHandleGlyph.cs
- RSAOAEPKeyExchangeDeformatter.cs
- Component.cs
- ConnectionPoolManager.cs
- SqlBulkCopy.cs
- WindowsListView.cs
- DesignerObject.cs
- RNGCryptoServiceProvider.cs
- XmlExpressionDumper.cs
- SetUserPreferenceRequest.cs
- documentation.cs
- Stack.cs
- SequenceNumber.cs
- VariantWrapper.cs
- ListParagraph.cs
- CurrentChangingEventArgs.cs
- InternalDispatchObject.cs
- CfgSemanticTag.cs
- DbProviderSpecificTypePropertyAttribute.cs
- PersonalizationProviderHelper.cs
- StatusBarDrawItemEvent.cs
- MessageHeaderDescriptionCollection.cs
- CommandSet.cs
- SQLMembershipProvider.cs
- DataColumnMapping.cs
- TransactionFlowBindingElementImporter.cs
- _FtpControlStream.cs
- XmlIlVisitor.cs
- RoleService.cs
- ConsoleKeyInfo.cs
- AdornerDecorator.cs
- TraceHandler.cs
- UTF8Encoding.cs
- XmlSchemaExporter.cs
- HostingEnvironmentSection.cs
- EntityViewGenerationConstants.cs
- XmlName.cs
- SrgsNameValueTag.cs
- EntityConnectionStringBuilder.cs
- WebPartCatalogCloseVerb.cs
- EncodingConverter.cs
- MemberProjectionIndex.cs
- ExceptionHandlerDesigner.cs
- PartitionResolver.cs
- SoapExtensionReflector.cs
- MailAddress.cs
- GridErrorDlg.cs
- OdbcHandle.cs
- ApplicationSecurityManager.cs
- DataPagerFieldCollection.cs
- Comparer.cs
- ModulesEntry.cs
- XmlTextReader.cs
- UserNameSecurityToken.cs
- ValidationSummary.cs
- ThreadPool.cs
- PackagePart.cs
- CallbackWrapper.cs
- PersonalizationAdministration.cs
- TokenBasedSet.cs
- TdsParserHelperClasses.cs
- DtdParser.cs
- TextStore.cs
- ColorPalette.cs
- FileDataSourceCache.cs
- UpWmlMobileTextWriter.cs
- Highlights.cs
- TypeSchema.cs
- DragSelectionMessageFilter.cs
- OleDbError.cs
- DoubleCollectionConverter.cs
- ProfileManager.cs
- ProviderConnectionPointCollection.cs
- TripleDES.cs
- MenuEventArgs.cs
- OrderToken.cs
- Menu.cs
- SafeNativeMethods.cs
- FormViewUpdatedEventArgs.cs
- OletxTransactionManager.cs
- ListDataBindEventArgs.cs
- ServiceCredentialsSecurityTokenManager.cs
- StoreAnnotationsMap.cs
- RegistrySecurity.cs
- AppSettingsExpressionBuilder.cs
- CompilationLock.cs