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
- AppDomainAttributes.cs
- CodeComment.cs
- BrowserTree.cs
- PrintingPermissionAttribute.cs
- Debug.cs
- NetMsmqBindingElement.cs
- ZipIOFileItemStream.cs
- EllipseGeometry.cs
- FormViewPageEventArgs.cs
- XmlReader.cs
- ExitEventArgs.cs
- ListControlStringCollectionEditor.cs
- EntityDataSourceMemberPath.cs
- _ServiceNameStore.cs
- ServicePoint.cs
- GenericsInstances.cs
- DocumentPageTextView.cs
- DbConnectionClosed.cs
- EditorPartCollection.cs
- ProjectionRewriter.cs
- TextDpi.cs
- XmlNamespaceManager.cs
- DrawingCollection.cs
- QueryInterceptorAttribute.cs
- OutOfProcStateClientManager.cs
- PassportPrincipal.cs
- DataColumnSelectionConverter.cs
- TextWriterTraceListener.cs
- DirectionalLight.cs
- Timeline.cs
- PersonalizationProviderHelper.cs
- WebPartAuthorizationEventArgs.cs
- TextDecorationUnitValidation.cs
- SourceFileBuildProvider.cs
- AssociationSet.cs
- ToolStripControlHost.cs
- AsyncOperation.cs
- InputManager.cs
- ObjectDataSourceStatusEventArgs.cs
- DataGridViewRowHeaderCell.cs
- XsltQilFactory.cs
- SerializableTypeCodeDomSerializer.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- DetailsViewUpdateEventArgs.cs
- CatalogZoneAutoFormat.cs
- CatalogZone.cs
- BrushMappingModeValidation.cs
- MediaElementAutomationPeer.cs
- RegistryPermission.cs
- TypedCompletedAsyncResult.cs
- MailAddressCollection.cs
- BindingMemberInfo.cs
- InvokeGenerator.cs
- File.cs
- MethodAccessException.cs
- FilteredDataSetHelper.cs
- UnsafeNativeMethods.cs
- UiaCoreTypesApi.cs
- TextEffect.cs
- IDataContractSurrogate.cs
- GC.cs
- PageStatePersister.cs
- ProfileSettings.cs
- PackUriHelper.cs
- AuthenticationModulesSection.cs
- SqlUtils.cs
- ImageCreator.cs
- ResourcesChangeInfo.cs
- BooleanFunctions.cs
- KeyGestureValueSerializer.cs
- FixedSOMTableRow.cs
- CssStyleCollection.cs
- SmtpCommands.cs
- MediaCommands.cs
- ComboBox.cs
- XmlSerializationWriter.cs
- SymbolEqualComparer.cs
- DocumentScope.cs
- BindingObserver.cs
- RealProxy.cs
- ObjectCloneHelper.cs
- JapaneseLunisolarCalendar.cs
- JoinTreeSlot.cs
- MappingMetadataHelper.cs
- ChannelSettingsElement.cs
- RotateTransform.cs
- Converter.cs
- MobileUserControl.cs
- TdsParserStateObject.cs
- IProvider.cs
- EventSourceCreationData.cs
- NumberFormatInfo.cs
- ProcessInfo.cs
- HttpConfigurationSystem.cs
- MediaElementAutomationPeer.cs
- SmtpNetworkElement.cs
- DataGridViewColumnTypePicker.cs
- OutputCacheProfile.cs
- ImportCatalogPart.cs
- ParentQuery.cs