Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / CompMod / System / ComponentModel / StringConverter.cs / 1 / 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); } } }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
- UserControl.cs
- IODescriptionAttribute.cs
- ThreadPool.cs
- FormsAuthenticationModule.cs
- RealizedColumnsBlock.cs
- ClientTargetCollection.cs
- MultiDataTrigger.cs
- XmlStreamNodeWriter.cs
- MbpInfo.cs
- ProgressChangedEventArgs.cs
- CodeArrayIndexerExpression.cs
- PartialClassGenerationTask.cs
- EntityParameterCollection.cs
- MetabaseSettingsIis7.cs
- CalendarKeyboardHelper.cs
- EntityContainerAssociationSetEnd.cs
- LinqDataSourceDeleteEventArgs.cs
- XmlWriter.cs
- ColorConverter.cs
- FileDialog.cs
- CellTreeNodeVisitors.cs
- SoapAttributeAttribute.cs
- COM2PictureConverter.cs
- Permission.cs
- ProjectedSlot.cs
- Compress.cs
- ContainerFilterService.cs
- BindingMemberInfo.cs
- ExpressionBindingsDialog.cs
- HttpDictionary.cs
- BamlBinaryReader.cs
- HttpCacheVary.cs
- DetailsViewPageEventArgs.cs
- InnerItemCollectionView.cs
- ReturnEventArgs.cs
- MimeFormReflector.cs
- ReadOnlyMetadataCollection.cs
- XamlToRtfWriter.cs
- TypographyProperties.cs
- KeyFrames.cs
- TranslateTransform3D.cs
- TextPenaltyModule.cs
- TypeInformation.cs
- TableAutomationPeer.cs
- DataRow.cs
- ArrayTypeMismatchException.cs
- CodeParameterDeclarationExpressionCollection.cs
- HostExecutionContextManager.cs
- GridViewCancelEditEventArgs.cs
- AssertFilter.cs
- EntryPointNotFoundException.cs
- TrackingMemoryStream.cs
- UndirectedGraph.cs
- ACE.cs
- ClusterSafeNativeMethods.cs
- SqlReferenceCollection.cs
- DataGridState.cs
- CryptoApi.cs
- IntSecurity.cs
- Quaternion.cs
- HttpDebugHandler.cs
- ProxyWebPartConnectionCollection.cs
- HashRepartitionStream.cs
- COAUTHIDENTITY.cs
- metadatamappinghashervisitor.hashsourcebuilder.cs
- BookmarkScope.cs
- SingleAnimation.cs
- SystemIPv4InterfaceProperties.cs
- MenuBase.cs
- CodeEventReferenceExpression.cs
- RoleGroup.cs
- XmlDictionaryReaderQuotas.cs
- IconConverter.cs
- FlowDocumentPageViewerAutomationPeer.cs
- SafeFileMappingHandle.cs
- HostedHttpContext.cs
- PackagingUtilities.cs
- AuthenticateEventArgs.cs
- ParagraphResult.cs
- ZoneLinkButton.cs
- SystemColorTracker.cs
- HandleDictionary.cs
- MultiByteCodec.cs
- GridViewHeaderRowPresenter.cs
- DecimalConstantAttribute.cs
- EditorOptionAttribute.cs
- ConcurrentStack.cs
- AppDomainManager.cs
- SoapSchemaImporter.cs
- COM2ExtendedUITypeEditor.cs
- HttpModuleActionCollection.cs
- DataBindingHandlerAttribute.cs
- ResourceBinder.cs
- TrackingMemoryStream.cs
- XsltFunctions.cs
- X509IssuerSerialKeyIdentifierClause.cs
- SignatureToken.cs
- ThumbAutomationPeer.cs
- RunWorkerCompletedEventArgs.cs
- ViewCellSlot.cs