Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / 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
- DeferredReference.cs
- BooleanStorage.cs
- ZipIOEndOfCentralDirectoryBlock.cs
- InputScope.cs
- SamlAuthenticationClaimResource.cs
- AbandonedMutexException.cs
- RegexTypeEditor.cs
- XPathScanner.cs
- SafeFileHandle.cs
- XmlAttributeAttribute.cs
- ObjectDataSourceFilteringEventArgs.cs
- FamilyCollection.cs
- OdbcCommandBuilder.cs
- XamlContextStack.cs
- WebSysDisplayNameAttribute.cs
- EntityWrapperFactory.cs
- Int64Animation.cs
- TableSectionStyle.cs
- XpsSerializationManager.cs
- SortExpressionBuilder.cs
- EntityDataSourceMemberPath.cs
- GetImportedCardRequest.cs
- InputReportEventArgs.cs
- DesignBindingPropertyDescriptor.cs
- HybridDictionary.cs
- AdvancedBindingPropertyDescriptor.cs
- Constants.cs
- DataListItemCollection.cs
- RegisteredExpandoAttribute.cs
- HtmlProps.cs
- DataSysAttribute.cs
- TagPrefixAttribute.cs
- FixUp.cs
- IPEndPoint.cs
- DoubleLink.cs
- PrintSchema.cs
- DataServiceException.cs
- NavigationProperty.cs
- PartialCachingControl.cs
- XmlNamespaceMappingCollection.cs
- OdbcDataReader.cs
- BufferedGraphicsManager.cs
- EventNotify.cs
- _OSSOCK.cs
- ObfuscateAssemblyAttribute.cs
- DataSourceProvider.cs
- DataTemplate.cs
- KeyNotFoundException.cs
- RightsManagementInformation.cs
- DataContractSerializerServiceBehavior.cs
- SchemaElementDecl.cs
- EditorZoneDesigner.cs
- RelationshipConstraintValidator.cs
- CellQuery.cs
- SecurityTokenAuthenticator.cs
- ProfilePropertyMetadata.cs
- LinearGradientBrush.cs
- AlignmentXValidation.cs
- OptimisticConcurrencyException.cs
- SqlErrorCollection.cs
- OleDbDataAdapter.cs
- UriSection.cs
- DataControlLinkButton.cs
- ToolStripControlHost.cs
- _BaseOverlappedAsyncResult.cs
- WebMessageBodyStyleHelper.cs
- SqlAliasesReferenced.cs
- PointCollection.cs
- SystemDropShadowChrome.cs
- VisualBrush.cs
- ImageMapEventArgs.cs
- BufferModeSettings.cs
- ToolStripCodeDomSerializer.cs
- AppearanceEditorPart.cs
- ListViewInsertEventArgs.cs
- FileDialogPermission.cs
- CodeGenerator.cs
- CommandConverter.cs
- EncoderBestFitFallback.cs
- UnmanagedBitmapWrapper.cs
- CommandLineParser.cs
- SqlTrackingWorkflowInstance.cs
- InteropAutomationProvider.cs
- ConfigurationException.cs
- ImportStoreException.cs
- BinaryCommonClasses.cs
- KeyInterop.cs
- ConnectionManagementSection.cs
- WindowsTreeView.cs
- ValueTable.cs
- dataSvcMapFileLoader.cs
- ToolStripSplitButton.cs
- DetailsView.cs
- SessionIDManager.cs
- ExpressionNode.cs
- GeneralTransform.cs
- AspNetHostingPermission.cs
- QilInvokeEarlyBound.cs
- AdPostCacheSubstitution.cs
- CalendarDateRange.cs