Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / fx / src / CompMod / System / ComponentModel / StringConverter.cs / 1305376 / StringConverter.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- /* */ namespace System.ComponentModel { using System.Diagnostics; using System.Globalization; using System.Runtime.InteropServices; using System.Runtime.Remoting; using System.Runtime.Serialization.Formatters; using System.Security.Permissions; ////// [HostProtection(SharedState = true)] public class StringConverter : TypeConverter { ///Provides a type converter to convert string objects to and from various other /// representations. ////// public override bool CanConvertFrom(ITypeDescriptorContext context, Type sourceType) { if (sourceType == typeof(string)) { return true; } return base.CanConvertFrom(context, sourceType); } ///Gets a value indicating whether this converter can convert an object in the /// given source type to a string using the specified context. ////// public override object ConvertFrom(ITypeDescriptorContext context, CultureInfo culture, object value) { if (value is string) { return (string)value; } if (value == null) { return ""; } return base.ConvertFrom(context, culture, value); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.Converts the specified value object to a string object. ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- PersonalizationStateQuery.cs
- CryptographicAttribute.cs
- OrderByLifter.cs
- ToolStripItemDataObject.cs
- ListBox.cs
- AddDataControlFieldDialog.cs
- ConnectionManagementSection.cs
- FloaterParagraph.cs
- SimpleRecyclingCache.cs
- PagesChangedEventArgs.cs
- KnownIds.cs
- DataGridViewToolTip.cs
- StaticTextPointer.cs
- BuildManagerHost.cs
- ToolboxItem.cs
- AsyncPostBackTrigger.cs
- MouseGestureConverter.cs
- TextDecorationCollectionConverter.cs
- UInt64Converter.cs
- ReliabilityContractAttribute.cs
- PixelFormatConverter.cs
- SpinWait.cs
- ImportContext.cs
- DataKey.cs
- TextTreeFixupNode.cs
- BmpBitmapDecoder.cs
- DesignerValidatorAdapter.cs
- LifetimeServices.cs
- OAVariantLib.cs
- log.cs
- PermissionAttributes.cs
- SeekStoryboard.cs
- InstallerTypeAttribute.cs
- ExpressionBuilderCollection.cs
- SBCSCodePageEncoding.cs
- GeometryGroup.cs
- AnimationStorage.cs
- TextEditorThreadLocalStore.cs
- StubHelpers.cs
- TraceData.cs
- ProxyWebPart.cs
- TemplatePartAttribute.cs
- CollectionViewSource.cs
- TransactionScopeDesigner.cs
- XmlSchemaSimpleContentRestriction.cs
- VarRefManager.cs
- XpsThumbnail.cs
- XmlSchemaInclude.cs
- DbModificationClause.cs
- TextWriterTraceListener.cs
- HttpListenerContext.cs
- SystemWebExtensionsSectionGroup.cs
- StylusDevice.cs
- ScriptResourceInfo.cs
- LogoValidationException.cs
- recordstate.cs
- SchemaType.cs
- SimpleRecyclingCache.cs
- PrtCap_Public_Simple.cs
- WriteTimeStream.cs
- NavigateEvent.cs
- ByteStream.cs
- NavigateEvent.cs
- keycontainerpermission.cs
- DbProviderFactory.cs
- AmbientProperties.cs
- PolicyValidationException.cs
- RowsCopiedEventArgs.cs
- RootProfilePropertySettingsCollection.cs
- TextServicesHost.cs
- AmbientLight.cs
- Select.cs
- GradientStop.cs
- LogEntry.cs
- SqlDataSourceDesigner.cs
- Unit.cs
- ImageFormat.cs
- messageonlyhwndwrapper.cs
- XmlExpressionDumper.cs
- StringUtil.cs
- PrimitiveCodeDomSerializer.cs
- ListBox.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- CorrelationTokenTypeConvertor.cs
- EncryptedReference.cs
- XamlParser.cs
- InfoCardHelper.cs
- AttributeUsageAttribute.cs
- SchemaCreator.cs
- ProfileModule.cs
- HttpClientCertificate.cs
- ComponentRenameEvent.cs
- FormViewPagerRow.cs
- BackEase.cs
- ConnectionManagementElement.cs
- WebPartTransformer.cs
- NativeMethods.cs
- SiteMapPathDesigner.cs
- MemberRestriction.cs
- SerialPort.cs