Code:
/ FXUpdate3074 / FXUpdate3074 / 1.1 / untmp / whidbey / QFE / ndp / fx / src / xsp / System / Web / UI / WebControls / EmptyStringExpandableObjectConverter.cs / 1 / EmptyStringExpandableObjectConverter.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System.ComponentModel;
using System.Globalization;
using System.Security.Permissions;
///
/// Converts an object to String.Empty so it looks better in the designer property grid.
///
internal sealed class EmptyStringExpandableObjectConverter : ExpandableObjectConverter {
///
/// Returns String.Empty so the object looks better in the designer property grid.
///
public override object ConvertTo(ITypeDescriptorContext context, CultureInfo culture, object value, Type destinationType) {
if (destinationType == typeof(string)) {
return String.Empty;
}
throw GetConvertToException(value, destinationType);
}
}
}
// 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
- ScriptBehaviorDescriptor.cs
- PropertyChangeTracker.cs
- DataGridDefaultColumnWidthTypeConverter.cs
- NumberFormatInfo.cs
- XmlSchemaType.cs
- InfoCardX509Validator.cs
- TextClipboardData.cs
- AttributedMetaModel.cs
- ChildDocumentBlock.cs
- ChannelManager.cs
- AnnotationComponentManager.cs
- DescendantQuery.cs
- TextElementCollectionHelper.cs
- AuthStoreRoleProvider.cs
- _SSPISessionCache.cs
- IntMinMaxAggregationOperator.cs
- ReachNamespaceInfo.cs
- BrowserPolicyValidator.cs
- UIPermission.cs
- HandlerWithFactory.cs
- FlatButtonAppearance.cs
- FontClient.cs
- URLMembershipCondition.cs
- CRYPTPROTECT_PROMPTSTRUCT.cs
- EventProxy.cs
- CultureSpecificStringDictionary.cs
- CodeDelegateInvokeExpression.cs
- _AutoWebProxyScriptEngine.cs
- SecurityPolicySection.cs
- MenuAdapter.cs
- ExcludePathInfo.cs
- SafeRightsManagementSessionHandle.cs
- FontCacheUtil.cs
- _ContextAwareResult.cs
- ProvidersHelper.cs
- StateMachineSubscription.cs
- Tokenizer.cs
- RuntimeEnvironment.cs
- SqlDataSourceSelectingEventArgs.cs
- DesignTimeVisibleAttribute.cs
- HttpGetServerProtocol.cs
- TextBoxBase.cs
- ObjectItemCollection.cs
- ReadOnlyDictionary.cs
- RegexStringValidatorAttribute.cs
- SchemaNotation.cs
- LineGeometry.cs
- Internal.cs
- InProcStateClientManager.cs
- MatrixTransform3D.cs
- FreezableDefaultValueFactory.cs
- GlyphCollection.cs
- NodeLabelEditEvent.cs
- InvalidPrinterException.cs
- DbProviderFactoriesConfigurationHandler.cs
- TabItemAutomationPeer.cs
- MemoryRecordBuffer.cs
- MulticastDelegate.cs
- PropertyEmitterBase.cs
- Timer.cs
- XmlSerializerVersionAttribute.cs
- DiscoveryDocumentSearchPattern.cs
- OdbcStatementHandle.cs
- SystemDropShadowChrome.cs
- XmlSerializationWriter.cs
- UInt16Converter.cs
- OdbcCommandBuilder.cs
- StateMachineSubscription.cs
- UserNameSecurityTokenAuthenticator.cs
- CheckBoxList.cs
- DataBoundControlHelper.cs
- autovalidator.cs
- XmlElementAttributes.cs
- AmbientLight.cs
- FaultPropagationQuery.cs
- GPStream.cs
- ListView.cs
- WithParamAction.cs
- CredentialManagerDialog.cs
- SimpleFileLog.cs
- WebPartCollection.cs
- LineInfo.cs
- StatusBarPanel.cs
- FrameworkEventSource.cs
- ProjectionAnalyzer.cs
- MetadataCache.cs
- WindowsSysHeader.cs
- DecoderFallbackWithFailureFlag.cs
- ConfigurationConverterBase.cs
- VisualBrush.cs
- DefaultObjectMappingItemCollection.cs
- XmlSchemaAppInfo.cs
- DeferredTextReference.cs
- ToolBarPanel.cs
- ObjectSpanRewriter.cs
- WebServiceHostFactory.cs
- ListDictionary.cs
- IgnoreSection.cs
- ConvertersCollection.cs
- DataGridViewBindingCompleteEventArgs.cs