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
- VariableBinder.cs
- DesignerProperties.cs
- HttpHandlerAction.cs
- BuildManagerHost.cs
- HttpCacheParams.cs
- ViewManager.cs
- CoTaskMemHandle.cs
- LineSegment.cs
- MatrixCamera.cs
- CurrencyManager.cs
- DesignerAdRotatorAdapter.cs
- TypeConverterValueSerializer.cs
- objectresult_tresulttype.cs
- GridViewRowEventArgs.cs
- UTF8Encoding.cs
- MsmqTransportSecurityElement.cs
- WindowAutomationPeer.cs
- RuntimeConfigurationRecord.cs
- WinInetCache.cs
- NetTcpBindingCollectionElement.cs
- TextLineBreak.cs
- EnumMemberAttribute.cs
- webproxy.cs
- EventTrigger.cs
- WebConfigurationManager.cs
- NetworkStream.cs
- HighlightComponent.cs
- Root.cs
- OperandQuery.cs
- BitmapEffectGeneralTransform.cs
- DatePickerDateValidationErrorEventArgs.cs
- WaitForChangedResult.cs
- ReferencedAssemblyResolver.cs
- HMAC.cs
- EdmConstants.cs
- TypedReference.cs
- StringReader.cs
- Boolean.cs
- LineSegment.cs
- VectorAnimation.cs
- RegexInterpreter.cs
- BinaryCommonClasses.cs
- ServiceEndpointAssociationProvider.cs
- querybuilder.cs
- TableAdapterManagerNameHandler.cs
- Visitor.cs
- X509Certificate.cs
- RuntimeArgumentHandle.cs
- BrowserTree.cs
- TextTreeUndoUnit.cs
- ECDiffieHellmanCngPublicKey.cs
- NamespaceDecl.cs
- PackageStore.cs
- ProcessModelInfo.cs
- TrackBar.cs
- TypeNameConverter.cs
- WindowsImpersonationContext.cs
- TabControlCancelEvent.cs
- ParameterCollection.cs
- EntityContainerAssociationSet.cs
- BridgeDataReader.cs
- CodeCompiler.cs
- RsaSecurityKey.cs
- validation.cs
- SpAudioStreamWrapper.cs
- AsyncPostBackErrorEventArgs.cs
- TextTabProperties.cs
- LeaseManager.cs
- PatternMatcher.cs
- Permission.cs
- SqlRecordBuffer.cs
- OutputCacheProfileCollection.cs
- DesignUtil.cs
- XPathSelectionIterator.cs
- SettingsPropertyWrongTypeException.cs
- HtmlWindowCollection.cs
- DiscoveryClientBindingElement.cs
- AttributeSetAction.cs
- RootAction.cs
- GatewayDefinition.cs
- CompositeFontParser.cs
- MemberDomainMap.cs
- LabelLiteral.cs
- RtType.cs
- RuntimeCompatibilityAttribute.cs
- Attributes.cs
- DataGridViewButtonCell.cs
- DoubleAverageAggregationOperator.cs
- ControlCodeDomSerializer.cs
- ExecutionEngineException.cs
- GeneralTransform3DGroup.cs
- SapiGrammar.cs
- ListMarkerLine.cs
- ListItemViewAttribute.cs
- ByteAnimationUsingKeyFrames.cs
- XPathSelectionIterator.cs
- CultureMapper.cs
- DetailsViewPageEventArgs.cs
- MulticastDelegate.cs
- Vertex.cs