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
- DbTypeMap.cs
- FixedSOMContainer.cs
- embossbitmapeffect.cs
- CurrencyManager.cs
- WinFormsComponentEditor.cs
- TransformPattern.cs
- TerminatorSinks.cs
- AdapterUtil.cs
- DbConnectionOptions.cs
- InkCanvasSelectionAdorner.cs
- ReliabilityContractAttribute.cs
- HtmlHead.cs
- SubtreeProcessor.cs
- EventRoute.cs
- OrthographicCamera.cs
- EventKeyword.cs
- GlobalAllocSafeHandle.cs
- TdsValueSetter.cs
- SoapTypeAttribute.cs
- ResourceReferenceExpression.cs
- XmlSchemaSimpleTypeList.cs
- EmptyReadOnlyDictionaryInternal.cs
- PropertyNames.cs
- SerializerDescriptor.cs
- IndexExpression.cs
- DESCryptoServiceProvider.cs
- InvalidEnumArgumentException.cs
- UpdateManifestForBrowserApplication.cs
- ExpandedWrapper.cs
- HttpPostServerProtocol.cs
- UrlUtility.cs
- DataRecordInfo.cs
- ClientTarget.cs
- NestedContainer.cs
- FormatVersion.cs
- Thumb.cs
- TargetParameterCountException.cs
- precedingsibling.cs
- VisualStateGroup.cs
- OdbcConnectionFactory.cs
- StrokeIntersection.cs
- TcpStreams.cs
- TracingConnectionInitiator.cs
- AgileSafeNativeMemoryHandle.cs
- XsltOutput.cs
- ConnectionProviderAttribute.cs
- OdbcConnectionHandle.cs
- AsmxEndpointPickerExtension.cs
- LinkTarget.cs
- DbConvert.cs
- SafeNativeMethods.cs
- GroupPartitionExpr.cs
- ThicknessAnimationUsingKeyFrames.cs
- CommandConverter.cs
- DataMember.cs
- ToolboxItemLoader.cs
- PackWebRequestFactory.cs
- FileAuthorizationModule.cs
- TextServicesCompartmentContext.cs
- LineBreakRecord.cs
- PrintPageEvent.cs
- FamilyTypeface.cs
- XPathNavigatorKeyComparer.cs
- RegexTree.cs
- SchemaCreator.cs
- LicenseContext.cs
- SelectedGridItemChangedEvent.cs
- XmlSchemaAttributeGroupRef.cs
- EditingCoordinator.cs
- ParsedAttributeCollection.cs
- SqlServer2KCompatibilityAnnotation.cs
- QueryUtil.cs
- DateTimeOffset.cs
- ServiceInstallComponent.cs
- ReverseInheritProperty.cs
- WsdlWriter.cs
- InstanceKeyNotReadyException.cs
- FilteredDataSetHelper.cs
- EdmRelationshipRoleAttribute.cs
- ListControlStringCollectionEditor.cs
- DomNameTable.cs
- ExpressionList.cs
- Simplifier.cs
- SqlPersonalizationProvider.cs
- CodeAttributeArgumentCollection.cs
- InheritanceAttribute.cs
- CustomSignedXml.cs
- MouseOverProperty.cs
- ParallelTimeline.cs
- NavigateEvent.cs
- FormParameter.cs
- CodeConditionStatement.cs
- XPathNodeIterator.cs
- MouseButtonEventArgs.cs
- RoleGroupCollection.cs
- QuotedPrintableStream.cs
- FunctionNode.cs
- UITypeEditors.cs
- HostAdapter.cs
- CoordinationService.cs