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
- DelegateBodyWriter.cs
- LambdaCompiler.ControlFlow.cs
- CacheMode.cs
- FlowchartDesigner.Helpers.cs
- XsltQilFactory.cs
- ItemType.cs
- DependencyPropertyKey.cs
- ControlEvent.cs
- HtmlInputRadioButton.cs
- CustomSignedXml.cs
- Assert.cs
- Boolean.cs
- BindingBase.cs
- PaperSize.cs
- ToolTipService.cs
- PlaceHolder.cs
- MappingMetadataHelper.cs
- AppearanceEditorPart.cs
- AppSettingsExpressionEditor.cs
- InstanceDataCollection.cs
- Hash.cs
- CursorEditor.cs
- SpellerHighlightLayer.cs
- ExceptionHandler.cs
- XamlFilter.cs
- DiscoveryClientChannelFactory.cs
- StubHelpers.cs
- FilterQueryOptionExpression.cs
- FixedBufferAttribute.cs
- Literal.cs
- MethodCallTranslator.cs
- CompositeDuplexBindingElementImporter.cs
- SharedUtils.cs
- CalendarTable.cs
- RawStylusInputCustomData.cs
- DeviceContexts.cs
- ByteArrayHelperWithString.cs
- SqlBulkCopyColumnMapping.cs
- ContainerFilterService.cs
- SqlTransaction.cs
- GridViewSortEventArgs.cs
- CodeDomLoader.cs
- OdbcEnvironment.cs
- DrawingBrush.cs
- MsdtcWrapper.cs
- NetworkAddressChange.cs
- DataListCommandEventArgs.cs
- URLIdentityPermission.cs
- InvokeWebServiceDesigner.cs
- WebRequest.cs
- PermissionSetTriple.cs
- GridViewRowPresenter.cs
- DesignerActionList.cs
- ImageIndexConverter.cs
- GeometryCombineModeValidation.cs
- EpmHelper.cs
- OdbcInfoMessageEvent.cs
- TypeLoadException.cs
- XmlSerializerSection.cs
- SecurityElement.cs
- ParameterBuilder.cs
- MimeTypePropertyAttribute.cs
- DataProviderNameConverter.cs
- backend.cs
- SerializableAttribute.cs
- DescendentsWalker.cs
- ConfigXmlElement.cs
- ThemeInfoAttribute.cs
- ObjectDesignerDataSourceView.cs
- TemplateControl.cs
- LongValidator.cs
- COM2Enum.cs
- InlineCollection.cs
- IsolatedStorageFilePermission.cs
- ICspAsymmetricAlgorithm.cs
- GridViewCommandEventArgs.cs
- TemplateControlCodeDomTreeGenerator.cs
- TextTreeTextElementNode.cs
- X509CertificateValidator.cs
- Message.cs
- ProcessManager.cs
- TextServicesDisplayAttribute.cs
- Parameter.cs
- UnauthorizedWebPart.cs
- SQLBytesStorage.cs
- CryptoKeySecurity.cs
- BasePropertyDescriptor.cs
- GridViewCancelEditEventArgs.cs
- SystemResourceHost.cs
- ConfigXmlDocument.cs
- WrappedReader.cs
- EnumerableRowCollection.cs
- XmlSchemaImporter.cs
- MarkupWriter.cs
- BinaryObjectReader.cs
- ExtenderHelpers.cs
- HostingEnvironment.cs
- AutomationIdentifier.cs
- _Win32.cs
- WindowInteropHelper.cs