Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- OperatorExpressions.cs
- ProgramNode.cs
- IndexedGlyphRun.cs
- WebZoneDesigner.cs
- SchemaNamespaceManager.cs
- Method.cs
- LinkConverter.cs
- TextBoxDesigner.cs
- DriveNotFoundException.cs
- DataSetUtil.cs
- ComplexType.cs
- RemoteArgument.cs
- TextEditorContextMenu.cs
- UpdateProgress.cs
- StatusBar.cs
- LicenseException.cs
- TabControlEvent.cs
- Misc.cs
- ControlTemplate.cs
- GlobalizationSection.cs
- DateTimeOffsetStorage.cs
- FontFamilyValueSerializer.cs
- SafeCryptoHandles.cs
- Interop.cs
- XmlCharCheckingWriter.cs
- ParserHooks.cs
- IndexedSelectQueryOperator.cs
- TemplateBamlRecordReader.cs
- XamlParser.cs
- HttpFileCollection.cs
- ClientTargetCollection.cs
- ScriptReference.cs
- MsmqBindingBase.cs
- UpdateManifestForBrowserApplication.cs
- MultiSelector.cs
- Size3D.cs
- BufferModeSettings.cs
- WorkflowViewElement.cs
- NetSectionGroup.cs
- DatagridviewDisplayedBandsData.cs
- QuaternionAnimation.cs
- DispatcherExceptionFilterEventArgs.cs
- ComponentSerializationService.cs
- UnsafeNativeMethodsCLR.cs
- ButtonStandardAdapter.cs
- TraceSection.cs
- Substitution.cs
- AssemblyBuilder.cs
- SqlConnectionString.cs
- TableDesigner.cs
- SoapSchemaExporter.cs
- PointLightBase.cs
- AppDomainFactory.cs
- KerberosRequestorSecurityTokenAuthenticator.cs
- StreamSecurityUpgradeAcceptorBase.cs
- MaxValueConverter.cs
- ADMembershipUser.cs
- RtfToken.cs
- MergeFilterQuery.cs
- CursorConverter.cs
- AccessDataSourceView.cs
- TrackingValidationObjectDictionary.cs
- ObjectToIdCache.cs
- WindowsListView.cs
- HorizontalAlignConverter.cs
- AnonymousIdentificationSection.cs
- HybridObjectCache.cs
- ExpressionBuilder.cs
- XmlAttributeHolder.cs
- SoapTypeAttribute.cs
- Baml2006ReaderContext.cs
- EdmProperty.cs
- SrgsElementFactoryCompiler.cs
- RtfFormatStack.cs
- StatusBar.cs
- TypeToken.cs
- OleDbDataAdapter.cs
- KernelTypeValidation.cs
- DataServiceConfiguration.cs
- InputBuffer.cs
- WSSecureConversationFeb2005.cs
- SafeTimerHandle.cs
- errorpatternmatcher.cs
- RegexParser.cs
- WindowsIdentity.cs
- PrePostDescendentsWalker.cs
- DataGrid.cs
- TableCell.cs
- SqlWebEventProvider.cs
- Configuration.cs
- FixedTextView.cs
- FontCacheUtil.cs
- DbReferenceCollection.cs
- EntityDataSourceValidationException.cs
- StandardOleMarshalObject.cs
- Point3DCollectionConverter.cs
- ValidateNames.cs
- AspNetSynchronizationContext.cs
- CommandLibraryHelper.cs
- XmlCountingReader.cs