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
- AccessDataSourceDesigner.cs
- NetTcpSecurity.cs
- ControlEvent.cs
- Model3D.cs
- StatusStrip.cs
- WindowsGrip.cs
- CacheHelper.cs
- AxisAngleRotation3D.cs
- TypeSource.cs
- PathParser.cs
- latinshape.cs
- RequiredAttributeAttribute.cs
- XslTransformFileEditor.cs
- StructuralCache.cs
- PropertyGridView.cs
- BinaryMethodMessage.cs
- CheckBox.cs
- MatrixUtil.cs
- InvalidFilterCriteriaException.cs
- Debug.cs
- ReaderContextStackData.cs
- Assembly.cs
- BypassElementCollection.cs
- Substitution.cs
- IDispatchConstantAttribute.cs
- ObjectDataSourceStatusEventArgs.cs
- StylusPointPropertyUnit.cs
- XmlImplementation.cs
- SafeArrayTypeMismatchException.cs
- Compress.cs
- SafeFileMapViewHandle.cs
- XmlValidatingReader.cs
- COAUTHIDENTITY.cs
- HtmlElementEventArgs.cs
- XmlSchemaAnnotated.cs
- DataViewSettingCollection.cs
- PageEventArgs.cs
- ErrorHandler.cs
- StaticExtensionConverter.cs
- DesignerActionVerbList.cs
- Internal.cs
- BufferModeSettings.cs
- IdnMapping.cs
- _LocalDataStoreMgr.cs
- _LazyAsyncResult.cs
- HtmlAnchor.cs
- ValueExpressions.cs
- DataGridViewDataConnection.cs
- DragDropManager.cs
- PageParserFilter.cs
- ErrorRuntimeConfig.cs
- RulePatternOps.cs
- LayoutEngine.cs
- MarginCollapsingState.cs
- Command.cs
- BinaryUtilClasses.cs
- CompatibleComparer.cs
- InternalBufferOverflowException.cs
- UpDownEvent.cs
- dtdvalidator.cs
- QueryContinueDragEventArgs.cs
- OpenTypeLayout.cs
- XmlSchemaObject.cs
- LocationReference.cs
- RegisteredScript.cs
- GridViewColumnCollectionChangedEventArgs.cs
- GridViewColumnHeaderAutomationPeer.cs
- keycontainerpermission.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- AttributedMetaModel.cs
- SystemColorTracker.cs
- ServiceHandle.cs
- TypeRefElement.cs
- Pkcs9Attribute.cs
- DataObjectSettingDataEventArgs.cs
- TextProperties.cs
- ComboBoxItem.cs
- SatelliteContractVersionAttribute.cs
- glyphs.cs
- ObservableCollection.cs
- AnnotationResourceChangedEventArgs.cs
- VirtualPathUtility.cs
- CharacterBuffer.cs
- SoapElementAttribute.cs
- WorkflowViewService.cs
- Evidence.cs
- WorkflowQueue.cs
- DesignerActionTextItem.cs
- ImageMap.cs
- CallbackCorrelationInitializer.cs
- RSAOAEPKeyExchangeFormatter.cs
- MediaPlayerState.cs
- Point4D.cs
- _LazyAsyncResult.cs
- TemplatePropertyEntry.cs
- ToolboxCategoryItems.cs
- ConnectionPointCookie.cs
- Sql8ConformanceChecker.cs
- PreviewKeyDownEventArgs.cs
- HttpListener.cs