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
- XdrBuilder.cs
- ResourceDisplayNameAttribute.cs
- HttpModuleCollection.cs
- LoaderAllocator.cs
- TransformProviderWrapper.cs
- ServicePointManagerElement.cs
- WebBrowsableAttribute.cs
- FontCollection.cs
- UnsafeNativeMethodsCLR.cs
- XLinq.cs
- PriorityBindingExpression.cs
- SupportsEventValidationAttribute.cs
- CqlParserHelpers.cs
- UmAlQuraCalendar.cs
- DbProviderSpecificTypePropertyAttribute.cs
- ExpandedWrapper.cs
- MasterPageBuildProvider.cs
- DataGridViewRowContextMenuStripNeededEventArgs.cs
- ParsedAttributeCollection.cs
- CaseInsensitiveOrdinalStringComparer.cs
- StylusPointCollection.cs
- SByte.cs
- DataGridPageChangedEventArgs.cs
- ComponentRenameEvent.cs
- MenuBindingsEditorForm.cs
- XmlSchemaImport.cs
- MessageBox.cs
- TrustSection.cs
- OrderedHashRepartitionEnumerator.cs
- DynamicRenderer.cs
- WindowsGraphics.cs
- ProxyWebPart.cs
- COAUTHIDENTITY.cs
- SqlMetaData.cs
- XmlCollation.cs
- TypeUtil.cs
- FaultContext.cs
- MergeLocalizationDirectives.cs
- Crypto.cs
- IntersectQueryOperator.cs
- ScriptRef.cs
- MediaElement.cs
- GetLedgerEntryForRecipientRequest.cs
- StorageScalarPropertyMapping.cs
- RedirectionProxy.cs
- SocketAddress.cs
- StrokeDescriptor.cs
- XpsSerializerWriter.cs
- ProcessHostMapPath.cs
- _FtpControlStream.cs
- Point.cs
- ValidatedControlConverter.cs
- BuildDependencySet.cs
- UIntPtr.cs
- SerializationObjectManager.cs
- ProcessHostServerConfig.cs
- TypeGeneratedEventArgs.cs
- ToolStripItem.cs
- SqlTopReducer.cs
- Viewport3DAutomationPeer.cs
- ExtendedProtectionPolicy.cs
- RIPEMD160Managed.cs
- ToolStripSettings.cs
- SelectionPatternIdentifiers.cs
- StatusBarPanelClickEvent.cs
- TextTreeFixupNode.cs
- DataSourceControl.cs
- HuffModule.cs
- DefinitionBase.cs
- Simplifier.cs
- DataGridViewTextBoxColumn.cs
- MethodImplAttribute.cs
- ToolstripProfessionalRenderer.cs
- OrderedDictionary.cs
- OdbcEnvironmentHandle.cs
- ConnectionsZone.cs
- CultureData.cs
- TransportContext.cs
- IsolatedStorageFilePermission.cs
- COM2ICategorizePropertiesHandler.cs
- ExpressionBuilder.cs
- AbstractExpressions.cs
- FamilyMap.cs
- ExpanderAutomationPeer.cs
- DrawItemEvent.cs
- UDPClient.cs
- DataPagerFieldCollection.cs
- TabPanel.cs
- Keyboard.cs
- CompilationUnit.cs
- DatatypeImplementation.cs
- EventLogInformation.cs
- SwitchAttribute.cs
- ListViewInsertEventArgs.cs
- CounterCreationData.cs
- BaseParser.cs
- HttpListenerResponse.cs
- GridView.cs
- IIS7UserPrincipal.cs
- reliableinputsessionchannel.cs