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
- AQNBuilder.cs
- WmlCalendarAdapter.cs
- LicenseManager.cs
- KeyNotFoundException.cs
- Vector3DAnimationUsingKeyFrames.cs
- webeventbuffer.cs
- XmlSchemaSimpleContentRestriction.cs
- SessionStateSection.cs
- ValueProviderWrapper.cs
- WebDisplayNameAttribute.cs
- BuildProvider.cs
- TrackBarDesigner.cs
- WaitHandleCannotBeOpenedException.cs
- ErrorView.xaml.cs
- ListBindingHelper.cs
- TextContainerHelper.cs
- AutomationPatternInfo.cs
- ToolboxCategoryItems.cs
- UnionQueryOperator.cs
- SmtpTransport.cs
- PageThemeBuildProvider.cs
- QueryAccessibilityHelpEvent.cs
- SelectiveScrollingGrid.cs
- ContentType.cs
- HostSecurityManager.cs
- Pool.cs
- CellParaClient.cs
- ToolTipService.cs
- Int16Storage.cs
- assertwrapper.cs
- EnterpriseServicesHelper.cs
- HttpCachePolicy.cs
- WindowsStatic.cs
- ToolStripComboBox.cs
- OneOfTypeConst.cs
- SqlConnectionString.cs
- RangeBaseAutomationPeer.cs
- ToolStripDropDownClosedEventArgs.cs
- ServiceOperationListItem.cs
- BrushConverter.cs
- SafeNativeMethodsOther.cs
- HttpContextServiceHost.cs
- NominalTypeEliminator.cs
- DataGridViewAutoSizeModeEventArgs.cs
- Path.cs
- ArithmeticException.cs
- QilGeneratorEnv.cs
- ReflectPropertyDescriptor.cs
- AsmxEndpointPickerExtension.cs
- AdornerPresentationContext.cs
- StringConcat.cs
- SqlConnectionStringBuilder.cs
- RawKeyboardInputReport.cs
- UidManager.cs
- Resources.Designer.cs
- BehaviorEditorPart.cs
- PtsContext.cs
- TopClause.cs
- WebPartEditorCancelVerb.cs
- OutputCacheProfile.cs
- ReferentialConstraint.cs
- ToolStripProfessionalLowResolutionRenderer.cs
- FixedSOMLineCollection.cs
- PageAsyncTask.cs
- MetadataUtil.cs
- TemplateColumn.cs
- RequestCacheValidator.cs
- TemplateControlCodeDomTreeGenerator.cs
- StylusPointDescription.cs
- HostingEnvironmentException.cs
- EncryptedKey.cs
- DBConcurrencyException.cs
- InputQueue.cs
- DataGridTableStyleMappingNameEditor.cs
- VectorCollection.cs
- DynamicUpdateCommand.cs
- GridView.cs
- NamedPermissionSet.cs
- DataGridCommandEventArgs.cs
- OdbcCommand.cs
- PagerStyle.cs
- TdsValueSetter.cs
- basevalidator.cs
- SqlDataRecord.cs
- WebPartCatalogCloseVerb.cs
- filewebresponse.cs
- BrowserCapabilitiesFactoryBase.cs
- MdImport.cs
- FormConverter.cs
- PropertyEmitterBase.cs
- CircleEase.cs
- ToolStripStatusLabel.cs
- CriticalHandle.cs
- UnmanagedMarshal.cs
- DataGridViewCellCollection.cs
- FilteredXmlReader.cs
- ListenerBinder.cs
- User.cs
- RolePrincipal.cs
- ChannelServices.cs