Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / clr / src / BCL / System / Collections / Generic / KeyValuePair.cs / 2 / 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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- TextFragmentEngine.cs
- TextDecorations.cs
- ThreadExceptionEvent.cs
- FileBasedResourceGroveler.cs
- HashAlgorithm.cs
- MimeTypeAttribute.cs
- FormDocumentDesigner.cs
- Matrix3D.cs
- ListDesigner.cs
- ActivityStatusChangeEventArgs.cs
- SubtreeProcessor.cs
- MultiTrigger.cs
- IListConverters.cs
- NativeMethods.cs
- TypeUtil.cs
- HashHelper.cs
- DataGridViewRowDividerDoubleClickEventArgs.cs
- RelatedEnd.cs
- TextFormatterImp.cs
- wgx_render.cs
- TargetConverter.cs
- MenuAutoFormat.cs
- TransformerConfigurationWizardBase.cs
- StorageRoot.cs
- OrderedHashRepartitionStream.cs
- SHA256Cng.cs
- PersonalizationProviderHelper.cs
- GroupDescription.cs
- IDReferencePropertyAttribute.cs
- InputMethod.cs
- RecognizerStateChangedEventArgs.cs
- Pen.cs
- TracingConnectionInitiator.cs
- DiagnosticsConfigurationHandler.cs
- ElementHost.cs
- HttpGetServerProtocol.cs
- OSFeature.cs
- TracedNativeMethods.cs
- WebPartAuthorizationEventArgs.cs
- TargetException.cs
- GridItem.cs
- KnownColorTable.cs
- PersonalizableTypeEntry.cs
- UTF8Encoding.cs
- ReadOnlyHierarchicalDataSource.cs
- TransactionContextValidator.cs
- MLangCodePageEncoding.cs
- StringSorter.cs
- AnimationTimeline.cs
- DesignerActionUI.cs
- HostingEnvironmentSection.cs
- PreservationFileWriter.cs
- StrictAndMessageFilter.cs
- MSAAWinEventWrap.cs
- ObjectList.cs
- SQLMoneyStorage.cs
- SqlXml.cs
- InvalidProgramException.cs
- validationstate.cs
- Axis.cs
- HashAlgorithm.cs
- WarningException.cs
- XmlSchemaComplexContentExtension.cs
- FileStream.cs
- ToolStripAdornerWindowService.cs
- BitmapCodecInfo.cs
- GeometryModel3D.cs
- TabletCollection.cs
- BroadcastEventHelper.cs
- RuntimeHandles.cs
- ColumnClickEvent.cs
- _WinHttpWebProxyDataBuilder.cs
- BitmapPalettes.cs
- TrackingProfileCache.cs
- WebEventCodes.cs
- XmlFormatExtensionPointAttribute.cs
- SimpleBitVector32.cs
- ToolStripArrowRenderEventArgs.cs
- ToolStripGrip.cs
- NetPipeSectionData.cs
- QilInvoke.cs
- Monitor.cs
- HttpProtocolImporter.cs
- CompilerScope.Storage.cs
- OuterGlowBitmapEffect.cs
- HScrollBar.cs
- XmlSerializerSection.cs
- PassportPrincipal.cs
- QilSortKey.cs
- GuidelineSet.cs
- ServiceKnownTypeAttribute.cs
- Run.cs
- Scripts.cs
- InputBuffer.cs
- ObjectDesignerDataSourceView.cs
- WebPartManagerInternals.cs
- WebServiceParameterData.cs
- HandlerBase.cs
- ViewgenGatekeeper.cs
- PropertyDescriptorGridEntry.cs