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
- TraceXPathNavigator.cs
- DataBindingsDialog.cs
- ObjectContext.cs
- Process.cs
- hresults.cs
- LongValidatorAttribute.cs
- StateMachine.cs
- WebPartZoneCollection.cs
- String.cs
- DSACryptoServiceProvider.cs
- FormsAuthenticationEventArgs.cs
- IUnknownConstantAttribute.cs
- SqlConnectionFactory.cs
- XsltFunctions.cs
- SignerInfo.cs
- UIAgentInitializationException.cs
- VariableExpressionConverter.cs
- ImportFileRequest.cs
- ScopeElement.cs
- BoolLiteral.cs
- ClearTypeHintValidation.cs
- WindowAutomationPeer.cs
- DataRecord.cs
- XmlReflectionImporter.cs
- ItemsPresenter.cs
- X509CertificateStore.cs
- Pair.cs
- WorkflowServiceOperationListItem.cs
- Imaging.cs
- AssemblyHelper.cs
- MappingModelBuildProvider.cs
- KeyPressEvent.cs
- AssemblyBuilder.cs
- TextDpi.cs
- filewebrequest.cs
- Stack.cs
- ReferencedCollectionType.cs
- AccessViolationException.cs
- _HeaderInfoTable.cs
- RegionInfo.cs
- InternalCompensate.cs
- FindProgressChangedEventArgs.cs
- WorkflowPersistenceContext.cs
- EntityDataSourceContainerNameItem.cs
- WindowsToolbarAsMenu.cs
- httpapplicationstate.cs
- FrugalList.cs
- SineEase.cs
- FloaterBaseParaClient.cs
- ToolStripHighContrastRenderer.cs
- WebPartCollection.cs
- RevocationPoint.cs
- OdbcDataReader.cs
- InkSerializer.cs
- InstancePersistenceEvent.cs
- CurrentTimeZone.cs
- StreamGeometry.cs
- SmtpFailedRecipientsException.cs
- ValueExpressions.cs
- SerialReceived.cs
- GenericTypeParameterBuilder.cs
- StrongTypingException.cs
- _NetRes.cs
- RectAnimationClockResource.cs
- NetworkInterface.cs
- ClientScriptManager.cs
- COAUTHIDENTITY.cs
- CharStorage.cs
- XmlReaderSettings.cs
- EntityKey.cs
- FixedSOMLineRanges.cs
- XsltQilFactory.cs
- XmlUtil.cs
- Viewport3DAutomationPeer.cs
- LinkedResource.cs
- ProfileBuildProvider.cs
- WebPartCatalogAddVerb.cs
- EnumConverter.cs
- SchemaNames.cs
- InfoCardRSAPKCS1SignatureFormatter.cs
- BmpBitmapDecoder.cs
- wgx_render.cs
- BitmapSourceSafeMILHandle.cs
- SplitterPanel.cs
- _FtpDataStream.cs
- GenericTypeParameterBuilder.cs
- GenericXmlSecurityToken.cs
- securitycriticaldataClass.cs
- ProtocolsConfigurationHandler.cs
- ControlTemplate.cs
- DispatcherFrame.cs
- StaticResourceExtension.cs
- XmlSerializerAssemblyAttribute.cs
- DataGridViewRowErrorTextNeededEventArgs.cs
- WebPartConnectionCollection.cs
- ToolBar.cs
- StatusBarAutomationPeer.cs
- SchemaObjectWriter.cs
- HttpBindingExtension.cs
- Calendar.cs