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
- XmlCustomFormatter.cs
- DESCryptoServiceProvider.cs
- XamlGridLengthSerializer.cs
- ListViewContainer.cs
- DbConnectionPoolIdentity.cs
- UnSafeCharBuffer.cs
- XmlSchemaAttributeGroup.cs
- XmlILTrace.cs
- SQLInt16Storage.cs
- LayeredChannelListener.cs
- EditorOptionAttribute.cs
- EncoderParameters.cs
- PropertyCollection.cs
- PopupRoot.cs
- InputManager.cs
- Int16Storage.cs
- SmtpLoginAuthenticationModule.cs
- UserNameSecurityTokenProvider.cs
- WebReferencesBuildProvider.cs
- SocketInformation.cs
- TreeViewImageIndexConverter.cs
- PenContexts.cs
- SafeLibraryHandle.cs
- DependencyPropertyDescriptor.cs
- TargetConverter.cs
- ActivityMetadata.cs
- PictureBox.cs
- RelationshipDetailsRow.cs
- ChannelListenerBase.cs
- FieldNameLookup.cs
- ButtonChrome.cs
- ReadContentAsBinaryHelper.cs
- FormViewCommandEventArgs.cs
- ConfigurationManagerInternal.cs
- XsdDateTime.cs
- DataServiceQueryProvider.cs
- InitializerFacet.cs
- AndCondition.cs
- InputLanguageProfileNotifySink.cs
- Utils.cs
- ProfileManager.cs
- BaseCollection.cs
- WebServiceTypeData.cs
- ModuleConfigurationInfo.cs
- SettingsProperty.cs
- ContextStack.cs
- TimeSpanOrInfiniteConverter.cs
- FixedSOMTableCell.cs
- ReceiveActivity.cs
- Native.cs
- HtmlEncodedRawTextWriter.cs
- MsmqIntegrationReceiveParameters.cs
- VisualSerializer.cs
- RewritingPass.cs
- MarkupCompilePass1.cs
- SQLCharsStorage.cs
- BoundColumn.cs
- DictionaryItemsCollection.cs
- DBConnection.cs
- Transactions.cs
- MetadataItem_Static.cs
- LineUtil.cs
- DataGridTablesFactory.cs
- FixedSOMTable.cs
- BoolExpressionVisitors.cs
- ExceptionHandlerDesigner.cs
- XmlQuerySequence.cs
- CodeTypeMemberCollection.cs
- ControlValuePropertyAttribute.cs
- DetailsViewPagerRow.cs
- DataGridTextBox.cs
- TheQuery.cs
- Win32.cs
- PopupRoot.cs
- ToolStripRendererSwitcher.cs
- DataPagerFieldCollection.cs
- ClientFormsIdentity.cs
- OleDbRowUpdatingEvent.cs
- SystemKeyConverter.cs
- Cursors.cs
- DesignerProperties.cs
- FSWPathEditor.cs
- HtmlShimManager.cs
- TypeGeneratedEventArgs.cs
- _LocalDataStoreMgr.cs
- ShaderEffect.cs
- ListView.cs
- XmlWriterTraceListener.cs
- AssemblyFilter.cs
- Cursor.cs
- QueryHandler.cs
- SByte.cs
- PixelFormatConverter.cs
- TextServicesContext.cs
- IndexOutOfRangeException.cs
- HttpResponseHeader.cs
- HeaderedContentControl.cs
- ProviderBase.cs
- Geometry.cs
- BuildManagerHost.cs