Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / clr / src / BCL / System / Reflection / Emit / MethodToken.cs / 1 / MethodToken.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: MethodToken
**
**
** Purpose: Represents a Method 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 MethodToken
{
public static readonly MethodToken Empty = new MethodToken();
internal int m_method;
internal MethodToken(int str) {
m_method=str;
}
public int Token {
get { return m_method; }
}
public override int GetHashCode()
{
return m_method;
}
public override bool Equals(Object obj)
{
if (obj is MethodToken)
return Equals((MethodToken)obj);
else
return false;
}
public bool Equals(MethodToken obj)
{
return obj.m_method == m_method;
}
public static bool operator ==(MethodToken a, MethodToken b)
{
return a.Equals(b);
}
public static bool operator !=(MethodToken a, MethodToken b)
{
return !(a == b);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: MethodToken
**
**
** Purpose: Represents a Method 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 MethodToken
{
public static readonly MethodToken Empty = new MethodToken();
internal int m_method;
internal MethodToken(int str) {
m_method=str;
}
public int Token {
get { return m_method; }
}
public override int GetHashCode()
{
return m_method;
}
public override bool Equals(Object obj)
{
if (obj is MethodToken)
return Equals((MethodToken)obj);
else
return false;
}
public bool Equals(MethodToken obj)
{
return obj.m_method == m_method;
}
public static bool operator ==(MethodToken a, MethodToken b)
{
return a.Equals(b);
}
public static bool operator !=(MethodToken a, MethodToken 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
- Documentation.cs
- HasCopySemanticsAttribute.cs
- StringReader.cs
- RestClientProxyHandler.cs
- DocumentOrderQuery.cs
- FixedNode.cs
- GridViewColumnHeader.cs
- DataAccessException.cs
- BackgroundFormatInfo.cs
- SortExpressionBuilder.cs
- Win32Exception.cs
- ExtendedProtectionPolicyTypeConverter.cs
- WebConfigurationHost.cs
- TimeIntervalCollection.cs
- FlowDocumentFormatter.cs
- IssuanceLicense.cs
- DeliveryRequirementsAttribute.cs
- StateChangeEvent.cs
- Baml2006ReaderSettings.cs
- MetadataFile.cs
- OptimizedTemplateContent.cs
- StackSpiller.Bindings.cs
- StyleHelper.cs
- StatusBar.cs
- SafeFindHandle.cs
- CryptoProvider.cs
- TextOnlyOutput.cs
- WinFormsUtils.cs
- RsaSecurityToken.cs
- InternalPermissions.cs
- X509Certificate.cs
- XmlSchemaGroupRef.cs
- WebPartMinimizeVerb.cs
- HasActivatableWorkflowEvent.cs
- WebPartEditorCancelVerb.cs
- CleanUpVirtualizedItemEventArgs.cs
- WindowsIdentity.cs
- CLSCompliantAttribute.cs
- DeclaredTypeElement.cs
- KernelTypeValidation.cs
- RadioButtonFlatAdapter.cs
- DataServiceBehavior.cs
- SpecularMaterial.cs
- HttpRuntimeSection.cs
- IRCollection.cs
- ContainerParagraph.cs
- ReadContentAsBinaryHelper.cs
- WsdlImporterElement.cs
- wgx_render.cs
- NameSpaceEvent.cs
- EntityDataSourceContainerNameConverter.cs
- DataGridViewHitTestInfo.cs
- DecimalAnimationUsingKeyFrames.cs
- TypePresenter.xaml.cs
- PropertySet.cs
- StaticSiteMapProvider.cs
- BindUriHelper.cs
- HashJoinQueryOperatorEnumerator.cs
- SqlNotificationRequest.cs
- EmptyControlCollection.cs
- StateMachineSubscriptionManager.cs
- OracleEncoding.cs
- ButtonDesigner.cs
- ZipPackagePart.cs
- BasicExpressionVisitor.cs
- ALinqExpressionVisitor.cs
- EntryWrittenEventArgs.cs
- OdbcError.cs
- FacetChecker.cs
- ModelUIElement3D.cs
- AdjustableArrowCap.cs
- EdmType.cs
- EventProperty.cs
- SubMenuStyle.cs
- _ContextAwareResult.cs
- LicenseManager.cs
- baseshape.cs
- CorrelationQueryBehavior.cs
- ContextBase.cs
- CodeCompiler.cs
- DetailsViewCommandEventArgs.cs
- SoapDocumentServiceAttribute.cs
- InboundActivityHelper.cs
- AnnotationResourceChangedEventArgs.cs
- AssemblyCacheEntry.cs
- SecurityKeyUsage.cs
- ListDictionary.cs
- HttpListenerContext.cs
- SizeValueSerializer.cs
- FileRecordSequenceCompletedAsyncResult.cs
- FormViewModeEventArgs.cs
- XmlSchemaProviderAttribute.cs
- RadioButtonStandardAdapter.cs
- RtfFormatStack.cs
- DataGridTable.cs
- UIAgentCrashedException.cs
- QilXmlWriter.cs
- PartialList.cs
- PhysicalAddress.cs
- Cursor.cs