Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Reflection / Emit / Label.cs / 1305376 / 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
- SqlConnectionHelper.cs
- WebPartCatalogAddVerb.cs
- DataRowView.cs
- BaseCodePageEncoding.cs
- Int16.cs
- TabItemWrapperAutomationPeer.cs
- EventSetter.cs
- Int16Storage.cs
- StrokeNodeOperations.cs
- BuildProvider.cs
- ValueProviderWrapper.cs
- PowerStatus.cs
- FloaterBaseParagraph.cs
- EditorPart.cs
- StringDictionaryCodeDomSerializer.cs
- EventHandlersStore.cs
- DataGridViewAutoSizeModeEventArgs.cs
- DateTimeAutomationPeer.cs
- StyleCollectionEditor.cs
- _BaseOverlappedAsyncResult.cs
- Avt.cs
- StaticSiteMapProvider.cs
- KeyGesture.cs
- StsCommunicationException.cs
- UnsafeNativeMethods.cs
- ObservableCollection.cs
- COM2IManagedPerPropertyBrowsingHandler.cs
- DataGridViewCellContextMenuStripNeededEventArgs.cs
- FontUnit.cs
- BooleanSwitch.cs
- CollectionViewProxy.cs
- InstanceDataCollection.cs
- TypeReference.cs
- CheckPair.cs
- PageSettings.cs
- MaskedTextBoxDesignerActionList.cs
- BevelBitmapEffect.cs
- OracleNumber.cs
- CatalogZone.cs
- ProtocolsSection.cs
- BlurEffect.cs
- RadioButtonFlatAdapter.cs
- DateTimeParse.cs
- RemotingHelper.cs
- ViewBase.cs
- TypeElement.cs
- MetadataConversionError.cs
- TakeOrSkipQueryOperator.cs
- ExclusiveTcpListener.cs
- WebHttpElement.cs
- XmlTextReader.cs
- EndOfStreamException.cs
- dtdvalidator.cs
- UrlMappingCollection.cs
- TextContainerHelper.cs
- EffectiveValueEntry.cs
- PersonalizationDictionary.cs
- KnownTypeDataContractResolver.cs
- ServiceModelActivationSectionGroup.cs
- ValueOfAction.cs
- GridViewColumnHeaderAutomationPeer.cs
- SqlUDTStorage.cs
- OciLobLocator.cs
- arclist.cs
- SelectionService.cs
- ManagedWndProcTracker.cs
- HMACSHA384.cs
- XmlSerializerVersionAttribute.cs
- ListControl.cs
- TextEditorThreadLocalStore.cs
- RepeaterItemCollection.cs
- SiteMapDataSourceView.cs
- WorkflowApplicationAbortedException.cs
- VScrollProperties.cs
- MenuItemCollectionEditorDialog.cs
- TransportReplyChannelAcceptor.cs
- InputLanguage.cs
- PageRanges.cs
- DescendentsWalkerBase.cs
- Effect.cs
- ScheduleChanges.cs
- UserNameSecurityToken.cs
- MatrixAnimationUsingKeyFrames.cs
- DataControlFieldCollection.cs
- AlternationConverter.cs
- MDIControlStrip.cs
- DebuggerAttributes.cs
- ServiceContractGenerationContext.cs
- BufferedGraphicsContext.cs
- Nullable.cs
- _NtlmClient.cs
- TrustLevel.cs
- EventDescriptor.cs
- CharacterMetrics.cs
- UrlPath.cs
- CustomAttributeSerializer.cs
- _SslState.cs
- DbParameterCollectionHelper.cs
- FontWeightConverter.cs
- GeneralTransformGroup.cs