Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / 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(); } } }
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- DictionaryKeyPropertyAttribute.cs
- LocalIdKeyIdentifierClause.cs
- HtmlElement.cs
- FullTextState.cs
- HttpAsyncResult.cs
- SessionStateUtil.cs
- WebBrowser.cs
- ProjectionNode.cs
- BinaryMethodMessage.cs
- NamedElement.cs
- ResourceCodeDomSerializer.cs
- SessionStateContainer.cs
- DataBindingList.cs
- _NegoStream.cs
- MailSettingsSection.cs
- LicenseManager.cs
- DXD.cs
- DynamicObject.cs
- Parser.cs
- DataGridViewCheckBoxCell.cs
- InvalidOperationException.cs
- FirstMatchCodeGroup.cs
- AnnotationDocumentPaginator.cs
- TypefaceMap.cs
- KnownTypeAttribute.cs
- Viewport2DVisual3D.cs
- TaskScheduler.cs
- WizardStepBase.cs
- SemanticResolver.cs
- DataGridCaption.cs
- DelegateSerializationHolder.cs
- ResourceDisplayNameAttribute.cs
- WinInetCache.cs
- FontDifferentiator.cs
- FigureParagraph.cs
- figurelength.cs
- Color.cs
- SemanticBasicElement.cs
- EdmComplexPropertyAttribute.cs
- SchemaNames.cs
- Parser.cs
- RijndaelManagedTransform.cs
- ActivityDesignerAccessibleObject.cs
- MessagePropertyFilter.cs
- FixedTextBuilder.cs
- TimeSpan.cs
- KnownTypes.cs
- RuleSetDialog.cs
- ProcessModule.cs
- PropertyChangedEventArgs.cs
- EntityDataSourceChangedEventArgs.cs
- KerberosReceiverSecurityToken.cs
- AttributeInfo.cs
- XmlSerializerAssemblyAttribute.cs
- SendMailErrorEventArgs.cs
- InkSerializer.cs
- DataGridTable.cs
- EditorZone.cs
- DataTransferEventArgs.cs
- PerfCounters.cs
- DataGridViewTextBoxEditingControl.cs
- PropertyValueChangedEvent.cs
- MdiWindowListStrip.cs
- SuppressMergeCheckAttribute.cs
- IPipelineRuntime.cs
- ZipFileInfoCollection.cs
- ViewGenResults.cs
- DataBinding.cs
- ColorInterpolationModeValidation.cs
- ItemCheckEvent.cs
- ClickablePoint.cs
- ConstructorNeedsTagAttribute.cs
- CodeGroup.cs
- ContainerActivationHelper.cs
- ResourceDescriptionAttribute.cs
- ImageField.cs
- DocobjHost.cs
- EmbeddedMailObject.cs
- DataGridRow.cs
- UserControlBuildProvider.cs
- SocketPermission.cs
- EmptyStringExpandableObjectConverter.cs
- ArgumentException.cs
- AtomMaterializerLog.cs
- VirtualizedItemPattern.cs
- TogglePattern.cs
- GeometryDrawing.cs
- CodeDOMProvider.cs
- PropertyMappingExceptionEventArgs.cs
- FontFamily.cs
- SystemThemeKey.cs
- TextWriterTraceListener.cs
- DynamicValidatorEventArgs.cs
- TextLineBreak.cs
- EventEntry.cs
- UserUseLicenseDictionaryLoader.cs
- APCustomTypeDescriptor.cs
- QuotedStringWriteStateInfo.cs
- SingleSelectRootGridEntry.cs
- TrustDriver.cs