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
- WebBodyFormatMessageProperty.cs
- XmlSchemaGroupRef.cs
- sqlpipe.cs
- HybridDictionary.cs
- PolicyManager.cs
- ScaleTransform.cs
- TrackBar.cs
- SoapMessage.cs
- PerformanceCountersElement.cs
- SubMenuStyleCollection.cs
- DataGridTable.cs
- WebServiceClientProxyGenerator.cs
- SessionKeyExpiredException.cs
- RepeaterItem.cs
- StructuredTypeEmitter.cs
- TextContainerChangeEventArgs.cs
- AliasExpr.cs
- WindowsProgressbar.cs
- SafeJobHandle.cs
- ModelUtilities.cs
- CompositeScriptReferenceEventArgs.cs
- ValidationRule.cs
- Attributes.cs
- ItemsChangedEventArgs.cs
- FontNamesConverter.cs
- SafeEventLogReadHandle.cs
- CaseExpr.cs
- XmlSchemaComplexContent.cs
- UniqueIdentifierService.cs
- RegexGroup.cs
- StreamGeometry.cs
- ListenerSessionConnectionReader.cs
- ResourceDescriptionAttribute.cs
- OutputCacheProfile.cs
- PickBranchDesigner.xaml.cs
- RC2.cs
- HttpListenerContext.cs
- RemoteWebConfigurationHost.cs
- SQLBinary.cs
- OracleParameterCollection.cs
- SingleAnimationUsingKeyFrames.cs
- TimeIntervalCollection.cs
- GlyphManager.cs
- SerializerProvider.cs
- XmlCDATASection.cs
- CqlParser.cs
- OrderingQueryOperator.cs
- ConstantCheck.cs
- Double.cs
- QueueProcessor.cs
- TextElementEnumerator.cs
- ObjectAssociationEndMapping.cs
- DigitShape.cs
- BasicViewGenerator.cs
- ViewGenerator.cs
- BindingElementCollection.cs
- DataGridTextBoxColumn.cs
- NumberFunctions.cs
- ViewCellRelation.cs
- MimeFormReflector.cs
- ColorTransform.cs
- DbProviderManifest.cs
- MediaContextNotificationWindow.cs
- _ShellExpression.cs
- CommentEmitter.cs
- SchemaElement.cs
- MenuItemStyle.cs
- CodeDirectiveCollection.cs
- ServiceControllerDesigner.cs
- EncoderParameters.cs
- EditorPartDesigner.cs
- SqlConnectionManager.cs
- ReferenceService.cs
- Helpers.cs
- Char.cs
- ByteStream.cs
- ScriptingProfileServiceSection.cs
- PipelineModuleStepContainer.cs
- AggregateException.cs
- TextDecoration.cs
- CssStyleCollection.cs
- FixedSOMPageElement.cs
- MyContact.cs
- HttpRequestWrapper.cs
- DiscoveryClientDocuments.cs
- StringSorter.cs
- PrimitiveSchema.cs
- _Rfc2616CacheValidators.cs
- WorkflowTraceTransfer.cs
- DurableMessageDispatchInspector.cs
- SuspendDesigner.cs
- XmlSchemaObject.cs
- TimelineClockCollection.cs
- ProjectionCamera.cs
- CultureData.cs
- DerivedKeySecurityTokenStub.cs
- _UriTypeConverter.cs
- SwitchAttribute.cs
- DocumentXPathNavigator.cs
- DefaultEvaluationContext.cs