Code:
/ DotNET / DotNET / 8.0 / untmp / WIN_WINDOWS / lh_tools_devdiv_wpf / Windows / wcp / Base / MS / Internal / NamedObject.cs / 1 / NamedObject.cs
//---------------------------------------------------------------------------- // //// Copyright (C) Microsoft Corporation. All rights reserved. // // // Description: Placeholder object, with a name that appears in the debugger // //--------------------------------------------------------------------------- using System; using System.Globalization; using MS.Internal.WindowsBase; namespace MS.Internal { ////// An instance of this class can be used wherever you might otherwise use /// "new Object()". The name will show up in the debugger, instead of /// merely "{object}" /// [FriendAccessAllowed] // Built into Base, also used by Framework. internal class NamedObject { public NamedObject(string name) { if (String.IsNullOrEmpty(name)) throw new ArgumentNullException(name); _name = name; } public override string ToString() { if (_name[0] != '{') { // lazily add {} around the name, to avoid allocating a string // until it's actually needed _name = String.Format(CultureInfo.InvariantCulture, "{{{0}}}", _name); } return _name; } string _name; } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IndexedEnumerable.cs
- Font.cs
- DesignerWidgets.cs
- SelectQueryOperator.cs
- BigInt.cs
- Pair.cs
- PeerInvitationResponse.cs
- LocalBuilder.cs
- AutoResizedEvent.cs
- RoamingStoreFile.cs
- HttpModuleAction.cs
- XmlSerializationWriter.cs
- ConfigXmlElement.cs
- XPathNodeIterator.cs
- XmlSchemaInclude.cs
- WebPartsPersonalizationAuthorization.cs
- MethodBuilderInstantiation.cs
- WhileDesigner.xaml.cs
- QilNode.cs
- DrawItemEvent.cs
- DLinqAssociationProvider.cs
- ActivityValidationServices.cs
- CalendarTable.cs
- HttpRuntimeSection.cs
- ButtonBase.cs
- OSFeature.cs
- StringFreezingAttribute.cs
- DBCommand.cs
- TemplateColumn.cs
- ComponentResourceKey.cs
- DoubleLinkListEnumerator.cs
- HuffCodec.cs
- ManifestBasedResourceGroveler.cs
- NamedPermissionSet.cs
- CompiledIdentityConstraint.cs
- XdrBuilder.cs
- WebServiceParameterData.cs
- BindingContext.cs
- PageAdapter.cs
- _ProxyChain.cs
- CachedFontFace.cs
- RemoteWebConfigurationHost.cs
- ImageFormat.cs
- TextProviderWrapper.cs
- DrawingVisualDrawingContext.cs
- XmlWrappingReader.cs
- ValidationPropertyAttribute.cs
- OSEnvironmentHelper.cs
- IPAddressCollection.cs
- UpdateException.cs
- ColorContext.cs
- CompositeDataBoundControl.cs
- SecurityCriticalDataForSet.cs
- EnterpriseServicesHelper.cs
- MatchNoneMessageFilter.cs
- OnOperation.cs
- FormViewPagerRow.cs
- ActiveDocumentEvent.cs
- ComboBoxItem.cs
- BrowserCapabilitiesCodeGenerator.cs
- MembershipValidatePasswordEventArgs.cs
- DataControlFieldHeaderCell.cs
- ComponentResourceKey.cs
- ThicknessConverter.cs
- TextSelectionHelper.cs
- DrawingAttributesDefaultValueFactory.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- ProtocolElement.cs
- DbTransaction.cs
- PageCache.cs
- TypeSemantics.cs
- MenuItem.cs
- HtmlElementErrorEventArgs.cs
- UrlMappingsSection.cs
- PerformanceCounterPermission.cs
- ColorContext.cs
- EnumerableRowCollection.cs
- VBIdentifierName.cs
- Stylus.cs
- DataSourceView.cs
- XmlSecureResolver.cs
- DataGridColumnHeader.cs
- MdImport.cs
- Stream.cs
- RectangleF.cs
- Control.cs
- MetadataSource.cs
- InputBuffer.cs
- TransformerInfoCollection.cs
- ArglessEventHandlerProxy.cs
- MediaContext.cs
- MessageQueueCriteria.cs
- RTTrackingProfile.cs
- Ipv6Element.cs
- ToolStripItemRenderEventArgs.cs
- FileDialogCustomPlacesCollection.cs
- XmlDataDocument.cs
- InfiniteIntConverter.cs
- XPathDocument.cs
- DataSourceView.cs