Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / clr / src / BCL / System / Reflection / Emit / Label.cs / 1 / Label.cs
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: Label
**
**
**
** Purpose: Represents a Label to the ILGenerator class.
**
**
===========================================================*/
namespace System.Reflection.Emit {
using System;
using System.Reflection;
using System.Security.Permissions;
using System.Runtime.InteropServices;
// The Label class is an opaque representation of a label used by the
// ILGenerator class. The token is used to mark where labels occur in the IL
// stream and then the necessary offsets are put back in the code when the ILGenerator
// is passed to the MethodWriter.
// Labels are created by using ILGenerator.CreateLabel and their position is set
// by using ILGenerator.MarkLabel.
[Serializable()]
[ComVisible(true)]
public struct Label {
internal int m_label;
//public Label() {
// m_label=0;
//}
internal Label (int label) {
m_label=label;
}
internal int GetLabelValue() {
return m_label;
}
public override int GetHashCode()
{
return m_label;
}
public override bool Equals(Object obj)
{
if (obj is Label)
return Equals((Label)obj);
else
return false;
}
public bool Equals(Label obj)
{
return obj.m_label == m_label;
}
public static bool operator ==(Label a, Label b)
{
return a.Equals(b);
}
public static bool operator !=(Label a, Label b)
{
return !(a == b);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// ==++==
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
// ==--==
/*============================================================
**
** Class: Label
**
**
**
** Purpose: Represents a Label to the ILGenerator class.
**
**
===========================================================*/
namespace System.Reflection.Emit {
using System;
using System.Reflection;
using System.Security.Permissions;
using System.Runtime.InteropServices;
// The Label class is an opaque representation of a label used by the
// ILGenerator class. The token is used to mark where labels occur in the IL
// stream and then the necessary offsets are put back in the code when the ILGenerator
// is passed to the MethodWriter.
// Labels are created by using ILGenerator.CreateLabel and their position is set
// by using ILGenerator.MarkLabel.
[Serializable()]
[ComVisible(true)]
public struct Label {
internal int m_label;
//public Label() {
// m_label=0;
//}
internal Label (int label) {
m_label=label;
}
internal int GetLabelValue() {
return m_label;
}
public override int GetHashCode()
{
return m_label;
}
public override bool Equals(Object obj)
{
if (obj is Label)
return Equals((Label)obj);
else
return false;
}
public bool Equals(Label obj)
{
return obj.m_label == m_label;
}
public static bool operator ==(Label a, Label b)
{
return a.Equals(b);
}
public static bool operator !=(Label a, Label 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
- ExportOptions.cs
- ConfigurationPermission.cs
- HtmlShim.cs
- ListChangedEventArgs.cs
- MultitargetingHelpers.cs
- TreeNodeCollectionEditor.cs
- GenerateScriptTypeAttribute.cs
- StreamSecurityUpgradeAcceptorBase.cs
- WebExceptionStatus.cs
- ReliableMessagingVersionConverter.cs
- WebBrowsableAttribute.cs
- HandlerMappingMemo.cs
- AnyAllSearchOperator.cs
- GraphicsContext.cs
- ExpressionServices.cs
- DataControlExtensions.cs
- DispatcherFrame.cs
- XhtmlTextWriter.cs
- StorageTypeMapping.cs
- AttributeExtensions.cs
- Visual3D.cs
- BitmapEffectCollection.cs
- Error.cs
- TextBlock.cs
- baseaxisquery.cs
- XmlSchemaParticle.cs
- PassportIdentity.cs
- MenuAdapter.cs
- ContainerFilterService.cs
- Source.cs
- ObfuscationAttribute.cs
- SqlRewriteScalarSubqueries.cs
- MonikerSyntaxException.cs
- FormClosingEvent.cs
- XamlTypeMapper.cs
- ToolStripManager.cs
- DelimitedListTraceListener.cs
- ScrollProperties.cs
- MethodBody.cs
- StructuredCompositeActivityDesigner.cs
- FrameDimension.cs
- SimpleTypesSurrogate.cs
- ContainerControl.cs
- HttpCacheVary.cs
- XmlSchemaIdentityConstraint.cs
- FlowDocumentView.cs
- InfoCardService.cs
- DocumentViewerBaseAutomationPeer.cs
- ExceptionHelpers.cs
- ColumnMapVisitor.cs
- SchemaSetCompiler.cs
- ServicePoint.cs
- ProtocolsSection.cs
- CompilerError.cs
- NamedObject.cs
- PolicyLevel.cs
- ToolBarButton.cs
- EventLogPermissionEntry.cs
- SqlDelegatedTransaction.cs
- ObjectListField.cs
- ProvideValueServiceProvider.cs
- EndpointNotFoundException.cs
- TcpClientChannel.cs
- XmlUrlResolver.cs
- CatalogPartChrome.cs
- LinqDataSourceValidationException.cs
- UnsafeNativeMethods.cs
- BaseParagraph.cs
- TextBox.cs
- XmlSerializationWriter.cs
- TaskFactory.cs
- ExtensionWindowResizeGrip.cs
- SocketManager.cs
- AttachedPropertyBrowsableForTypeAttribute.cs
- CodeValidator.cs
- ToolStripScrollButton.cs
- RegistryDataKey.cs
- ConnectionPointCookie.cs
- BoundField.cs
- CodeValidator.cs
- PowerStatus.cs
- PageMediaType.cs
- WhitespaceReader.cs
- DesignerProperties.cs
- WorkflowMarkupSerializer.cs
- ToolBar.cs
- LogSwitch.cs
- TextureBrush.cs
- StringFunctions.cs
- SrgsRuleRef.cs
- WebScriptServiceHostFactory.cs
- SqlDataAdapter.cs
- SspiHelper.cs
- EventMap.cs
- TemplateBamlRecordReader.cs
- XmlReaderDelegator.cs
- ClientBuildManager.cs
- Vector3D.cs
- SqlBooleanizer.cs
- StringKeyFrameCollection.cs