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
- HttpMethodAttribute.cs
- AutomationProperties.cs
- oledbconnectionstring.cs
- TableItemPattern.cs
- XmlWrappingReader.cs
- LayoutDump.cs
- ValueProviderWrapper.cs
- AttributeInfo.cs
- MenuItemStyleCollection.cs
- EventArgs.cs
- HyperlinkAutomationPeer.cs
- RegexMatch.cs
- FtpWebResponse.cs
- TreeViewEvent.cs
- ServiceChannelFactory.cs
- PreProcessor.cs
- SecurityPolicySection.cs
- _TimerThread.cs
- EncoderBestFitFallback.cs
- StringDictionary.cs
- DbConnectionPoolGroup.cs
- AppLevelCompilationSectionCache.cs
- XamlHostingConfiguration.cs
- SafeReversePInvokeHandle.cs
- ToolStripOverflow.cs
- SmtpMail.cs
- RuleSettingsCollection.cs
- TimeSpanValidator.cs
- SQLSingle.cs
- ProxyManager.cs
- Parsers.cs
- GPPOINT.cs
- StackBuilderSink.cs
- HashAlgorithm.cs
- PrintDocument.cs
- PartialCachingControl.cs
- XmlSchemaParticle.cs
- StringConverter.cs
- WinEventWrap.cs
- CompoundFileIOPermission.cs
- ConfigXmlComment.cs
- GAC.cs
- ZoneButton.cs
- WebPartConnectionsConnectVerb.cs
- ReaderContextStackData.cs
- PrefixQName.cs
- MailHeaderInfo.cs
- _CommandStream.cs
- OdbcCommand.cs
- ToolStripItemClickedEventArgs.cs
- DataGridViewCellValueEventArgs.cs
- CodeMethodReturnStatement.cs
- WindowInteractionStateTracker.cs
- HitTestParameters.cs
- SimpleHandlerFactory.cs
- SimpleType.cs
- WindowsListViewScroll.cs
- CollectionView.cs
- TimeSpanStorage.cs
- ListViewDeleteEventArgs.cs
- XmlNamedNodeMap.cs
- MethodToken.cs
- ControlParameter.cs
- NotifyCollectionChangedEventArgs.cs
- UpdateExpressionVisitor.cs
- FixUpCollection.cs
- LinkedList.cs
- TextShapeableCharacters.cs
- ProfileBuildProvider.cs
- ErrorFormatter.cs
- HttpHandlerAction.cs
- CapabilitiesSection.cs
- LateBoundBitmapDecoder.cs
- ErrorWebPart.cs
- WebContext.cs
- ScriptControlManager.cs
- CompositeActivityDesigner.cs
- DependencyPropertyKind.cs
- FormViewAutoFormat.cs
- FormViewDeletedEventArgs.cs
- httpserverutility.cs
- CharUnicodeInfo.cs
- AppearanceEditorPart.cs
- ToolStripLocationCancelEventArgs.cs
- ProviderBase.cs
- XhtmlBasicCalendarAdapter.cs
- Track.cs
- FunctionQuery.cs
- MessageAction.cs
- DisableDpiAwarenessAttribute.cs
- DataFormats.cs
- SelectionItemPattern.cs
- ObjectDataSourceStatusEventArgs.cs
- xmlsaver.cs
- AnnotationService.cs
- KnownBoxes.cs
- MimeFormatExtensions.cs
- CodeNamespaceImport.cs
- HyperLinkField.cs
- RSAOAEPKeyExchangeFormatter.cs