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
- LocationChangedEventArgs.cs
- Vector3DIndependentAnimationStorage.cs
- RawStylusInput.cs
- DynamicFilterExpression.cs
- URI.cs
- SocketElement.cs
- TabletCollection.cs
- FixedPageAutomationPeer.cs
- RegexBoyerMoore.cs
- NamespaceCollection.cs
- CallContext.cs
- RawContentTypeMapper.cs
- ToggleButton.cs
- _AutoWebProxyScriptEngine.cs
- HitTestWithPointDrawingContextWalker.cs
- ActivityCodeDomReferenceService.cs
- RectAnimationBase.cs
- ReceiveParametersContent.cs
- SQLUtility.cs
- NavigateEvent.cs
- TextOnlyOutput.cs
- XmlWriterTraceListener.cs
- RepeaterCommandEventArgs.cs
- SettingsPropertyIsReadOnlyException.cs
- Imaging.cs
- ApplicationActivator.cs
- AssociatedControlConverter.cs
- Internal.cs
- TextModifierScope.cs
- TemplateControlCodeDomTreeGenerator.cs
- EventProviderWriter.cs
- CurrentChangedEventManager.cs
- CqlQuery.cs
- DebuggerAttributes.cs
- DoubleKeyFrameCollection.cs
- LinkLabelLinkClickedEvent.cs
- TransformerInfoCollection.cs
- _NegoStream.cs
- ListViewHitTestInfo.cs
- JavaScriptString.cs
- SimpleApplicationHost.cs
- DelimitedListTraceListener.cs
- RowsCopiedEventArgs.cs
- SecurityContext.cs
- FlowDocumentFormatter.cs
- DetailsViewInsertEventArgs.cs
- RepeatBehavior.cs
- Image.cs
- Hex.cs
- NameTable.cs
- StackOverflowException.cs
- milrender.cs
- Literal.cs
- HttpHeaderCollection.cs
- XmlILTrace.cs
- EntityModelSchemaGenerator.cs
- TextContainerChangedEventArgs.cs
- OperandQuery.cs
- HttpProfileBase.cs
- TextViewDesigner.cs
- DataGridBoolColumn.cs
- Validator.cs
- StructuralCache.cs
- ConstrainedGroup.cs
- Normalization.cs
- GroupBox.cs
- PreviewPrintController.cs
- XPathNavigator.cs
- XamlToRtfWriter.cs
- SiteIdentityPermission.cs
- SimpleWebHandlerParser.cs
- TypeLibConverter.cs
- TdsValueSetter.cs
- PageSettings.cs
- WebPartZoneBase.cs
- QilReference.cs
- DetailsViewPageEventArgs.cs
- PropertyPath.cs
- ToolStripHighContrastRenderer.cs
- SystemIPInterfaceStatistics.cs
- CookielessHelper.cs
- NameValueConfigurationElement.cs
- SessionStateItemCollection.cs
- ServiceBuildProvider.cs
- ServiceOperationParameter.cs
- SoapServerMessage.cs
- AspCompat.cs
- PeerNameResolver.cs
- StringAttributeCollection.cs
- TemplateInstanceAttribute.cs
- RuleConditionDialog.cs
- EdmError.cs
- SystemIPGlobalStatistics.cs
- DSACryptoServiceProvider.cs
- CornerRadius.cs
- SqlCrossApplyToCrossJoin.cs
- ValidatingCollection.cs
- XmlSchemaGroupRef.cs
- CqlLexer.cs
- CodeAttributeArgumentCollection.cs