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
- RecognizerBase.cs
- FromReply.cs
- BitmapMetadataBlob.cs
- BindingValueChangedEventArgs.cs
- ConnectionPoint.cs
- CompositeClientFormatter.cs
- AutomationEvent.cs
- SqlClientMetaDataCollectionNames.cs
- WebSysDescriptionAttribute.cs
- QueryReaderSettings.cs
- ProtocolImporter.cs
- SRGSCompiler.cs
- CharacterBuffer.cs
- CacheAxisQuery.cs
- SelectionPattern.cs
- ReadOnlyPropertyMetadata.cs
- ValueOfAction.cs
- MultilineStringConverter.cs
- CacheForPrimitiveTypes.cs
- RtfNavigator.cs
- Literal.cs
- XmlTextReaderImplHelpers.cs
- MarshalByValueComponent.cs
- ObjectItemConventionAssemblyLoader.cs
- RequestDescription.cs
- PointValueSerializer.cs
- DbDataAdapter.cs
- BodyWriter.cs
- SecurityManager.cs
- OwnerDrawPropertyBag.cs
- PrintDocument.cs
- XmlAnyAttributeAttribute.cs
- TemplateParser.cs
- StateBag.cs
- SpecularMaterial.cs
- DiscoveryDocumentLinksPattern.cs
- ClientApiGenerator.cs
- BuilderPropertyEntry.cs
- BinHexEncoder.cs
- Environment.cs
- FileClassifier.cs
- HtmlAnchor.cs
- RectangleGeometry.cs
- SafeFileHandle.cs
- XmlSchemaSimpleType.cs
- ListViewEditEventArgs.cs
- TypeDescriptorContext.cs
- HtmlInputSubmit.cs
- MultitargetingHelpers.cs
- SharedPersonalizationStateInfo.cs
- Int16Storage.cs
- Switch.cs
- CodeTypeConstructor.cs
- XmlObjectSerializerContext.cs
- CharKeyFrameCollection.cs
- SafeSecurityHandles.cs
- XmlSchemaValidationException.cs
- StringValidatorAttribute.cs
- TabletCollection.cs
- DefaultParameterValueAttribute.cs
- StartUpEventArgs.cs
- CleanUpVirtualizedItemEventArgs.cs
- DockPatternIdentifiers.cs
- HealthMonitoringSection.cs
- SignedXmlDebugLog.cs
- SafePipeHandle.cs
- BooleanExpr.cs
- ParseNumbers.cs
- ControlBindingsCollection.cs
- TypeNameConverter.cs
- HwndProxyElementProvider.cs
- XhtmlBasicSelectionListAdapter.cs
- FontStyle.cs
- followingquery.cs
- SubMenuStyleCollection.cs
- AttributeEmitter.cs
- Animatable.cs
- PrimaryKeyTypeConverter.cs
- InputLanguageEventArgs.cs
- SEHException.cs
- WebAdminConfigurationHelper.cs
- CqlQuery.cs
- CodeTypeReference.cs
- SoapAttributeOverrides.cs
- StylusPointDescription.cs
- PackageFilter.cs
- ProjectionPathSegment.cs
- EventWaitHandleSecurity.cs
- ProbeMatchesCD1.cs
- GlyphTypeface.cs
- ObjectFactoryCodeDomTreeGenerator.cs
- WsdlExporter.cs
- _DisconnectOverlappedAsyncResult.cs
- SettingsContext.cs
- HttpDictionary.cs
- DeadCharTextComposition.cs
- OSFeature.cs
- CompiledQueryCacheKey.cs
- HtmlEncodedRawTextWriter.cs
- GridViewRowPresenterBase.cs