Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / xsp / System / Web / UI / WebControls / EmptyStringExpandableObjectConverter.cs / 1305376 / 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.
//
//-----------------------------------------------------------------------------
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.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ProvidePropertyAttribute.cs
- DefaultTraceListener.cs
- Clock.cs
- CodeDelegateCreateExpression.cs
- TextTreeText.cs
- ClickablePoint.cs
- ModuleElement.cs
- HMACSHA384.cs
- AutoGeneratedFieldProperties.cs
- IdnMapping.cs
- QilVisitor.cs
- ProgressBarBrushConverter.cs
- HttpDebugHandler.cs
- SslStream.cs
- CultureInfo.cs
- ContentPresenter.cs
- messageonlyhwndwrapper.cs
- ChannelManager.cs
- GeneralTransform3D.cs
- XmlMemberMapping.cs
- BehaviorEditorPart.cs
- ProfilePropertySettingsCollection.cs
- ProtocolsSection.cs
- UnmanagedMarshal.cs
- QuotedPrintableStream.cs
- ScaleTransform3D.cs
- Brush.cs
- AdornedElementPlaceholder.cs
- VersionUtil.cs
- VisualBrush.cs
- WorkflowOperationBehavior.cs
- MethodToken.cs
- ICspAsymmetricAlgorithm.cs
- SpeechRecognizer.cs
- SwitchElementsCollection.cs
- DataPagerFieldCollection.cs
- ToolBarPanel.cs
- SchemaMapping.cs
- ReliabilityContractAttribute.cs
- PasswordRecovery.cs
- ThumbButtonInfoCollection.cs
- DataBindingCollection.cs
- FilterQuery.cs
- HttpCacheVaryByContentEncodings.cs
- DateTimeFormatInfoScanner.cs
- TextWriterTraceListener.cs
- AppDomainProtocolHandler.cs
- HashAlgorithm.cs
- SqlSupersetValidator.cs
- GreenMethods.cs
- newinstructionaction.cs
- formatter.cs
- User.cs
- MetadataAssemblyHelper.cs
- LinqDataSourceView.cs
- ConfigurationSection.cs
- DataGridItemEventArgs.cs
- ToggleProviderWrapper.cs
- ListGeneralPage.cs
- CompositeDuplexBindingElementImporter.cs
- MsmqIntegrationSecurityMode.cs
- MailWebEventProvider.cs
- EntityType.cs
- ProgressPage.cs
- RefreshInfo.cs
- TextEditorSpelling.cs
- DirectoryNotFoundException.cs
- MgmtConfigurationRecord.cs
- DataSvcMapFile.cs
- HighlightComponent.cs
- WebPartEditVerb.cs
- RectangleConverter.cs
- DesignColumnCollection.cs
- RegistryKey.cs
- ToolStripItemClickedEventArgs.cs
- HybridWebProxyFinder.cs
- StylusPointPropertyInfo.cs
- SqlPersonalizationProvider.cs
- DeferredReference.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- ProjectedSlot.cs
- ArgumentNullException.cs
- ECDsaCng.cs
- StringReader.cs
- WebHeaderCollection.cs
- OleDbFactory.cs
- SqlParameter.cs
- HScrollProperties.cs
- SqlConnectionHelper.cs
- VersionConverter.cs
- MultilineStringConverter.cs
- _SSPISessionCache.cs
- WebPartMenuStyle.cs
- InternalPermissions.cs
- ResXDataNode.cs
- PropertyEmitter.cs
- VisualBrush.cs
- XslCompiledTransform.cs
- SmtpFailedRecipientsException.cs
- Byte.cs