Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / clr / src / BCL / System / Collections / Generic / KeyValuePair.cs / 1305376 / 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
- DependencySource.cs
- APCustomTypeDescriptor.cs
- UpdateCommand.cs
- StringBlob.cs
- DerivedKeyCachingSecurityTokenSerializer.cs
- AssemblyBuilder.cs
- StringUtil.cs
- LineBreak.cs
- IListConverters.cs
- BinHexEncoder.cs
- xdrvalidator.cs
- XmlDsigSep2000.cs
- DictionaryBase.cs
- ReaderContextStackData.cs
- FormsAuthentication.cs
- ToolStripItemEventArgs.cs
- HttpListenerRequest.cs
- ConfigurationPermission.cs
- CodeNamespaceImport.cs
- WizardSideBarListControlItemEventArgs.cs
- EventSinkHelperWriter.cs
- DelegateTypeInfo.cs
- ResourceDefaultValueAttribute.cs
- BamlLocalizabilityResolver.cs
- TCEAdapterGenerator.cs
- BinarySecretKeyIdentifierClause.cs
- SchemaImporterExtensionElement.cs
- ClientTarget.cs
- WebPartZoneDesigner.cs
- WindowsEditBoxRange.cs
- ToolStripLocationCancelEventArgs.cs
- graph.cs
- SQLDecimal.cs
- EdmFunction.cs
- AspNetHostingPermission.cs
- PolicyLevel.cs
- SafeBuffer.cs
- WebPartEditorApplyVerb.cs
- PartBasedPackageProperties.cs
- AccessibilityApplicationManager.cs
- NumericUpDown.cs
- ProfileEventArgs.cs
- RemoteWebConfigurationHostServer.cs
- ConfigurationSettings.cs
- PackagingUtilities.cs
- HeaderUtility.cs
- Function.cs
- ByteBufferPool.cs
- QilFactory.cs
- FontEmbeddingManager.cs
- AnnotationMap.cs
- fixedPageContentExtractor.cs
- TokenBasedSet.cs
- DataBindingCollection.cs
- UserControlBuildProvider.cs
- SerializationFieldInfo.cs
- CategoryGridEntry.cs
- ScriptingSectionGroup.cs
- ObjectTag.cs
- JsonCollectionDataContract.cs
- SimpleType.cs
- NullableFloatAverageAggregationOperator.cs
- ExpressionParser.cs
- UnicodeEncoding.cs
- LockedBorderGlyph.cs
- EntityDataSourceStatementEditor.cs
- URLIdentityPermission.cs
- ToolStripOverflowButton.cs
- FloaterParagraph.cs
- CommonProperties.cs
- Icon.cs
- SHA384CryptoServiceProvider.cs
- ComponentEditorForm.cs
- Encoder.cs
- LineVisual.cs
- UntypedNullExpression.cs
- AttachedProperty.cs
- PropertyItemInternal.cs
- webproxy.cs
- DataListItem.cs
- PingOptions.cs
- Viewport2DVisual3D.cs
- CardSpaceSelector.cs
- AssemblyAttributes.cs
- WindowsServiceElement.cs
- Encoder.cs
- WindowsFormsLinkLabel.cs
- DecimalAnimation.cs
- Int32RectConverter.cs
- OdbcEnvironmentHandle.cs
- DefaultMemberAttribute.cs
- FixedNode.cs
- ClosableStream.cs
- CompressEmulationStream.cs
- InboundActivityHelper.cs
- DbConnectionInternal.cs
- PageThemeCodeDomTreeGenerator.cs
- xsdvalidator.cs
- CodeTypeMember.cs
- EdmItemError.cs