Code:
/ Net / Net / 3.5.50727.3053 / DEVDIV / depot / DevDiv / releases / whidbey / netfxsp / 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(); } } } // 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
- QilStrConcat.cs
- NavigationHelper.cs
- ResourceAssociationSet.cs
- PreservationFileWriter.cs
- ButtonBase.cs
- XamlTreeBuilderBamlRecordWriter.cs
- BindableTemplateBuilder.cs
- ResponseStream.cs
- RawAppCommandInputReport.cs
- DataRelationPropertyDescriptor.cs
- BitmapImage.cs
- Normalizer.cs
- TcpPortSharing.cs
- CodeDomExtensionMethods.cs
- StaticFileHandler.cs
- TreeView.cs
- UserInitiatedRoutedEventPermissionAttribute.cs
- Query.cs
- TreeNode.cs
- AuthenticateEventArgs.cs
- X509Utils.cs
- KoreanCalendar.cs
- SimpleRecyclingCache.cs
- JumpPath.cs
- DataServiceStreamResponse.cs
- EncoderNLS.cs
- XPathNodeList.cs
- AutomationIdentifier.cs
- ComplexTypeEmitter.cs
- AsyncStreamReader.cs
- SimplePropertyEntry.cs
- DynamicValueConverter.cs
- CompilerState.cs
- RowUpdatingEventArgs.cs
- IImplicitResourceProvider.cs
- XdrBuilder.cs
- XmlProcessingInstruction.cs
- MonthChangedEventArgs.cs
- CriticalFinalizerObject.cs
- CompositeKey.cs
- DirtyTextRange.cs
- ExecutionEngineException.cs
- ObjectItemCollectionAssemblyCacheEntry.cs
- DoubleCollectionConverter.cs
- DataTableExtensions.cs
- DWriteFactory.cs
- AddDataControlFieldDialog.cs
- ErrorFormatterPage.cs
- OdbcDataReader.cs
- TouchesOverProperty.cs
- CommandConverter.cs
- ConfigurationSection.cs
- FileSystemEventArgs.cs
- DataPager.cs
- ImmutableObjectAttribute.cs
- TaskDesigner.cs
- RowToFieldTransformer.cs
- CapacityStreamGeometryContext.cs
- TransferRequestHandler.cs
- SqlErrorCollection.cs
- RegisteredHiddenField.cs
- Attributes.cs
- unsafeIndexingFilterStream.cs
- ImageDrawing.cs
- RSAProtectedConfigurationProvider.cs
- SafeFreeMibTable.cs
- RegexMatch.cs
- CodeMemberMethod.cs
- ServiceParser.cs
- remotingproxy.cs
- ControlsConfig.cs
- Propagator.Evaluator.cs
- SiteMapSection.cs
- GlyphRun.cs
- NameNode.cs
- FormViewUpdatedEventArgs.cs
- SafeRegistryHandle.cs
- ContextMenuStrip.cs
- BadImageFormatException.cs
- PerformanceCounterPermissionEntry.cs
- EventRouteFactory.cs
- ExpressionBuilderCollection.cs
- BehaviorEditorPart.cs
- UiaCoreTypesApi.cs
- ToolStripSettings.cs
- TableRowGroup.cs
- DictionaryChange.cs
- ContentType.cs
- Validator.cs
- Parser.cs
- PrintingPermissionAttribute.cs
- OleDbException.cs
- FilteredReadOnlyMetadataCollection.cs
- Int32RectValueSerializer.cs
- NestedContainer.cs
- WindowInteropHelper.cs
- Brush.cs
- MetadataAssemblyHelper.cs
- CompilerResults.cs
- PackageDigitalSignatureManager.cs