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
- HttpCachePolicy.cs
- PersonalizationEntry.cs
- RegexTree.cs
- Trace.cs
- XslTransform.cs
- InkPresenterAutomationPeer.cs
- PropertyDescriptorCollection.cs
- ModelPropertyDescriptor.cs
- Opcode.cs
- Rect3DConverter.cs
- Parsers.cs
- MessageSecurityOverTcp.cs
- TextTreeObjectNode.cs
- ProgressBar.cs
- DbProviderFactories.cs
- _NegoStream.cs
- ExtendedProtectionPolicyTypeConverter.cs
- EditorResources.cs
- XmlNotation.cs
- ToolStripItem.cs
- ArrayExtension.cs
- DetailsViewInsertedEventArgs.cs
- ComponentChangedEvent.cs
- GeometryModel3D.cs
- FigureHelper.cs
- CodeCatchClause.cs
- AdRotator.cs
- InternalDuplexChannelListener.cs
- ImageCodecInfoPrivate.cs
- ObjectListDesigner.cs
- LayoutDump.cs
- TranslateTransform3D.cs
- ToolTipAutomationPeer.cs
- WindowsIdentity.cs
- NativeBuffer.cs
- AuthorizationPolicyTypeElementCollection.cs
- FormViewDesigner.cs
- WizardStepBase.cs
- XPathNodePointer.cs
- FormsAuthenticationTicket.cs
- StrokeCollection.cs
- _PooledStream.cs
- ComponentResourceKeyConverter.cs
- CookieHandler.cs
- RelationshipEndCollection.cs
- FilterUserControlBase.cs
- ToolStripControlHost.cs
- RegexMatch.cs
- AssemblyName.cs
- DataShape.cs
- BitmapDownload.cs
- SecurityTokenSerializer.cs
- FormsAuthenticationTicket.cs
- NameSpaceExtractor.cs
- Menu.cs
- ProcessManager.cs
- WindowsSecurityTokenAuthenticator.cs
- ReaderWriterLock.cs
- CustomCredentialPolicy.cs
- FieldAccessException.cs
- XamlPathDataSerializer.cs
- UnmanagedMarshal.cs
- ListViewUpdatedEventArgs.cs
- TypeReference.cs
- SerializationEventsCache.cs
- GeneralTransformGroup.cs
- Point3DCollection.cs
- HtmlEncodedRawTextWriter.cs
- DesignerRegionMouseEventArgs.cs
- AccessedThroughPropertyAttribute.cs
- BamlRecordReader.cs
- OleDbStruct.cs
- LinqDataSourceDeleteEventArgs.cs
- ReadOnlyHierarchicalDataSourceView.cs
- EmptyStringExpandableObjectConverter.cs
- WindowsSolidBrush.cs
- NativeMethods.cs
- CellConstantDomain.cs
- XmlSchemaComplexType.cs
- ComponentDispatcherThread.cs
- MergePropertyDescriptor.cs
- ScriptComponentDescriptor.cs
- ImageClickEventArgs.cs
- NotImplementedException.cs
- WindowsListViewScroll.cs
- AttachedAnnotation.cs
- NeutralResourcesLanguageAttribute.cs
- SqlDataSourceQuery.cs
- ColorMatrix.cs
- DataGridViewHeaderCell.cs
- HandlerBase.cs
- RawMouseInputReport.cs
- CacheDependency.cs
- HostVisual.cs
- IHttpResponseInternal.cs
- sqlnorm.cs
- HtmlProps.cs
- OleDbParameter.cs
- PassportAuthenticationModule.cs
- CellTreeNodeVisitors.cs