Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / ndp / clr / src / BCL / System / Collections / Generic / KeyValuePair.cs / 1 / KeyValuePair.cs
// ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Interface: KeyValuePair ** ** ** Purpose: Generic key-value pair for dictionary enumerators. ** ** ===========================================================*/ namespace System.Collections.Generic { using System; using System.Text; // A KeyValuePair holds a key and a value from a dictionary. // It is returned by IDictionaryEnumerator::GetEntry(). [Serializable()] public struct KeyValuePair{ private TKey key; private TValue value; public KeyValuePair(TKey key, TValue value) { this.key = key; this.value = value; } public TKey Key { get { return key; } } public TValue Value { get { return value; } } public override string ToString() { StringBuilder s = new StringBuilder(); s.Append('['); if( Key != null) { s.Append(Key.ToString()); } s.Append(", "); if( Value != null) { s.Append(Value.ToString()); } s.Append(']'); return s.ToString(); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // ==++== // // Copyright (c) Microsoft Corporation. All rights reserved. // // ==--== /*============================================================ ** ** Interface: KeyValuePair ** ** ** Purpose: Generic key-value pair for dictionary enumerators. ** ** ===========================================================*/ namespace System.Collections.Generic { using System; using System.Text; // A KeyValuePair holds a key and a value from a dictionary. // It is returned by IDictionaryEnumerator::GetEntry(). [Serializable()] public struct KeyValuePair { private TKey key; private TValue value; public KeyValuePair(TKey key, TValue value) { this.key = key; this.value = value; } public TKey Key { get { return key; } } public TValue Value { get { return value; } } public override string ToString() { StringBuilder s = new StringBuilder(); s.Append('['); if( Key != null) { s.Append(Key.ToString()); } s.Append(", "); if( Value != null) { s.Append(Value.ToString()); } s.Append(']'); return s.ToString(); } } } // 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
- TextEditor.cs
- PageThemeParser.cs
- ObjectQueryState.cs
- FixedPageProcessor.cs
- ComplexObject.cs
- ConnectionStringsExpressionBuilder.cs
- Rotation3DAnimationUsingKeyFrames.cs
- SrgsItemList.cs
- PrimitiveType.cs
- DbProviderSpecificTypePropertyAttribute.cs
- CodeTypeReferenceCollection.cs
- PagesSection.cs
- SequentialUshortCollection.cs
- HyperLinkStyle.cs
- XamlToRtfWriter.cs
- DataControlFieldCollection.cs
- CompiledQuery.cs
- ParameterToken.cs
- DispatchChannelSink.cs
- URLIdentityPermission.cs
- CodeTypeParameter.cs
- AssertSection.cs
- TextRunTypographyProperties.cs
- DataBindingHandlerAttribute.cs
- DocumentViewerHelper.cs
- HttpListenerContext.cs
- ContextQuery.cs
- BulletedListEventArgs.cs
- ConfigurationStrings.cs
- WMIInterop.cs
- XmlSchemaAttribute.cs
- ServiceSecurityContext.cs
- CompositeActivityMarkupSerializer.cs
- SoapHeaderException.cs
- GeneralTransform2DTo3D.cs
- XmlAttributeOverrides.cs
- StrongNameSignatureInformation.cs
- UniqueContractNameValidationBehavior.cs
- webeventbuffer.cs
- Pair.cs
- CodeMethodReturnStatement.cs
- PropertyItemInternal.cs
- ImageList.cs
- KeyboardInputProviderAcquireFocusEventArgs.cs
- NativeMethods.cs
- Typography.cs
- ListenUriMode.cs
- UxThemeWrapper.cs
- Range.cs
- RepeatButtonAutomationPeer.cs
- WindowsTab.cs
- XmlAttribute.cs
- BulletedListEventArgs.cs
- XmlBinaryWriter.cs
- PeerUnsafeNativeCryptMethods.cs
- InstanceOwnerException.cs
- CollectionViewGroup.cs
- ProfessionalColors.cs
- DataGridTablesFactory.cs
- DragStartedEventArgs.cs
- ConnectorSelectionGlyph.cs
- DiffuseMaterial.cs
- ItemList.cs
- ResourceReferenceKeyNotFoundException.cs
- SerializerWriterEventHandlers.cs
- ListViewAutomationPeer.cs
- SchemaConstraints.cs
- Registry.cs
- PeerCollaboration.cs
- DataShape.cs
- CharacterBufferReference.cs
- XmlAttributes.cs
- ExecutorLocksHeldException.cs
- SqlIdentifier.cs
- RowParagraph.cs
- ContentHostHelper.cs
- TypedElement.cs
- SendKeys.cs
- VirtualPath.cs
- SessionStateContainer.cs
- FrameSecurityDescriptor.cs
- ListViewContainer.cs
- NoneExcludedImageIndexConverter.cs
- ClientFormsAuthenticationCredentials.cs
- MobileSysDescriptionAttribute.cs
- fixedPageContentExtractor.cs
- SID.cs
- XmlHelper.cs
- InheritanceRules.cs
- ConditionalExpression.cs
- CommonGetThemePartSize.cs
- DataTable.cs
- ResXDataNode.cs
- XmlToDatasetMap.cs
- TreeNode.cs
- UserControlDocumentDesigner.cs
- PanelStyle.cs
- PenLineCapValidation.cs
- FileDialogCustomPlace.cs
- VisualStyleTypesAndProperties.cs