Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / 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
- DirectionalLight.cs
- URL.cs
- NativeMethods.cs
- MsmqIntegrationSecurityMode.cs
- ToolStripGripRenderEventArgs.cs
- SymmetricAlgorithm.cs
- FloatUtil.cs
- validation.cs
- Parameter.cs
- HttpContextBase.cs
- CalendarTable.cs
- EventRoute.cs
- MimeTypeAttribute.cs
- ComponentConverter.cs
- EntitySetDataBindingList.cs
- DSACryptoServiceProvider.cs
- HttpListenerElement.cs
- NumericUpDownAccelerationCollection.cs
- WMIGenerator.cs
- ManualResetEvent.cs
- StringFunctions.cs
- GridViewItemAutomationPeer.cs
- ClockGroup.cs
- InputProviderSite.cs
- PageParserFilter.cs
- ToolStripLocationCancelEventArgs.cs
- DoubleStorage.cs
- TextParentUndoUnit.cs
- DPCustomTypeDescriptor.cs
- DesigntimeLicenseContext.cs
- LogicalTreeHelper.cs
- ArgumentOutOfRangeException.cs
- CharStorage.cs
- QueueProcessor.cs
- SqlNotificationRequest.cs
- XmlStreamNodeWriter.cs
- StreamSecurityUpgradeAcceptor.cs
- DefaultTextStoreTextComposition.cs
- IItemContainerGenerator.cs
- AppliedDeviceFiltersDialog.cs
- PageRequestManager.cs
- ExportException.cs
- Descriptor.cs
- FastPropertyAccessor.cs
- SqlUDTStorage.cs
- HttpProfileGroupBase.cs
- UdpChannelListener.cs
- XmlSchemaSimpleType.cs
- CurrentChangingEventManager.cs
- LookupNode.cs
- TdsValueSetter.cs
- SQLChars.cs
- SessionEndingCancelEventArgs.cs
- CatalogZone.cs
- WebSysDisplayNameAttribute.cs
- SchemaImporter.cs
- BooleanStorage.cs
- SendingRequestEventArgs.cs
- Message.cs
- mansign.cs
- SoapElementAttribute.cs
- Material.cs
- DateRangeEvent.cs
- Double.cs
- StringCollection.cs
- Stylesheet.cs
- DataContext.cs
- RawStylusSystemGestureInputReport.cs
- RuleSettingsCollection.cs
- DataGridViewRowCancelEventArgs.cs
- FormViewInsertedEventArgs.cs
- TypeDependencyAttribute.cs
- EditorBrowsableAttribute.cs
- EndpointFilterProvider.cs
- PropertyGridEditorPart.cs
- ManagementNamedValueCollection.cs
- ThreadStartException.cs
- KeyFrames.cs
- HttpConfigurationSystem.cs
- WebServiceMethodData.cs
- HMACSHA256.cs
- RuntimeConfigLKG.cs
- CommonDialog.cs
- xdrvalidator.cs
- InProcStateClientManager.cs
- XslAst.cs
- SystemFonts.cs
- ProfileInfo.cs
- WindowInteractionStateTracker.cs
- ScalarOps.cs
- ValueExpressions.cs
- XPathDocumentNavigator.cs
- DrawingServices.cs
- DataChangedEventManager.cs
- DataStreams.cs
- PerformanceCountersElement.cs
- DbConnectionHelper.cs
- XmlDataLoader.cs
- DependencyStoreSurrogate.cs
- RectangleGeometry.cs