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
- ZipFileInfoCollection.cs
- TypeConverterHelper.cs
- DetailsViewRowCollection.cs
- Maps.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- BCLDebug.cs
- DataTableNewRowEvent.cs
- MultiTrigger.cs
- TouchEventArgs.cs
- AgileSafeNativeMemoryHandle.cs
- namescope.cs
- ExpressionDumper.cs
- ActivityExecutionWorkItem.cs
- SharedHttpTransportManager.cs
- WebEventTraceProvider.cs
- DataRow.cs
- DateTimeFormatInfoScanner.cs
- OracleDateTime.cs
- UserMapPath.cs
- FixedSOMImage.cs
- UserControlCodeDomTreeGenerator.cs
- SoapClientProtocol.cs
- ImmutableClientRuntime.cs
- safex509handles.cs
- ErrorFormatterPage.cs
- SoapInteropTypes.cs
- IndicCharClassifier.cs
- DiagnosticsElement.cs
- InkCanvasInnerCanvas.cs
- TcpWorkerProcess.cs
- XmlSchemaSimpleTypeRestriction.cs
- WebContext.cs
- SqlGenerator.cs
- ListDictionaryInternal.cs
- RoleManagerEventArgs.cs
- StylusPointProperty.cs
- OleDbConnection.cs
- ChangeNode.cs
- InfoCardTrace.cs
- ObjectQuery.cs
- ObjectConverter.cs
- FacetDescription.cs
- DataRelationCollection.cs
- KeyedHashAlgorithm.cs
- BinaryFormatterWriter.cs
- RankException.cs
- ToolboxItemLoader.cs
- ConsoleCancelEventArgs.cs
- KeyValuePair.cs
- CompilerScope.cs
- BlurEffect.cs
- VisualBrush.cs
- ToolboxComponentsCreatedEventArgs.cs
- SoapCodeExporter.cs
- CodeComment.cs
- JsonEnumDataContract.cs
- CmsInterop.cs
- WindowsTab.cs
- InProcStateClientManager.cs
- SQLChars.cs
- Constant.cs
- InkSerializer.cs
- _LocalDataStore.cs
- FieldTemplateUserControl.cs
- ConstructorNeedsTagAttribute.cs
- SoapInteropTypes.cs
- WebReferenceOptions.cs
- DataListItemEventArgs.cs
- StringResourceManager.cs
- FixedLineResult.cs
- StickyNote.cs
- InputMethod.cs
- ValueChangedEventManager.cs
- TemplateAction.cs
- XPathDocumentNavigator.cs
- SafeNativeMethods.cs
- PackageDigitalSignatureManager.cs
- SafeMemoryMappedViewHandle.cs
- FastEncoderWindow.cs
- BitmapFrameEncode.cs
- ReturnType.cs
- RowsCopiedEventArgs.cs
- XmlCharacterData.cs
- CalendarDay.cs
- EdgeModeValidation.cs
- WinFormsComponentEditor.cs
- ThemeDirectoryCompiler.cs
- HandledEventArgs.cs
- PropertyMappingExceptionEventArgs.cs
- EntityDataSourceQueryBuilder.cs
- X509ServiceCertificateAuthentication.cs
- ImageMetadata.cs
- DefaultAssemblyResolver.cs
- HttpHandlerAction.cs
- RepeaterDesigner.cs
- objectresult_tresulttype.cs
- _Semaphore.cs
- SessionStateUtil.cs
- CuspData.cs
- WpfXamlType.cs