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
- CodeCompiler.cs
- XmlTypeMapping.cs
- CustomErrorCollection.cs
- StylusCollection.cs
- _OverlappedAsyncResult.cs
- Transform.cs
- ResourcePool.cs
- SystemNetworkInterface.cs
- ReadOnlyDictionary.cs
- X509CertificateChain.cs
- WindowsStatic.cs
- ClientTarget.cs
- DetailsViewPagerRow.cs
- DbQueryCommandTree.cs
- CustomWebEventKey.cs
- FloaterParagraph.cs
- SplineQuaternionKeyFrame.cs
- PrivateUnsafeNativeCompoundFileMethods.cs
- SchemaElement.cs
- PolicyLevel.cs
- _ConnectStream.cs
- HtmlShimManager.cs
- TextParagraph.cs
- XNodeValidator.cs
- QilGeneratorEnv.cs
- ClientRoleProvider.cs
- FusionWrap.cs
- RecommendedAsConfigurableAttribute.cs
- MetabaseSettingsIis7.cs
- RepeatButton.cs
- WmfPlaceableFileHeader.cs
- PartitionResolver.cs
- ItemCheckEvent.cs
- BitmapEffectDrawing.cs
- UncommonField.cs
- PageAsyncTask.cs
- InputLanguageEventArgs.cs
- ConfigXmlWhitespace.cs
- SqlUdtInfo.cs
- TrackingStringDictionary.cs
- CompressedStack.cs
- RpcCryptoRequest.cs
- SchemaElementDecl.cs
- SlipBehavior.cs
- Compress.cs
- WriterOutput.cs
- SourceElementsCollection.cs
- ClientFormsAuthenticationCredentials.cs
- SafeLocalMemHandle.cs
- TextTreeText.cs
- ActivityBuilderHelper.cs
- ValueQuery.cs
- messageonlyhwndwrapper.cs
- WindowProviderWrapper.cs
- ServiceErrorHandler.cs
- AliasedExpr.cs
- PerfCounters.cs
- WindowsNonControl.cs
- SendKeys.cs
- RoleService.cs
- PeerHelpers.cs
- SHA384CryptoServiceProvider.cs
- ManagedWndProcTracker.cs
- SQLMembershipProvider.cs
- EntityType.cs
- ListViewEditEventArgs.cs
- MetadataSource.cs
- _LazyAsyncResult.cs
- Paragraph.cs
- PeerNameRecord.cs
- SystemEvents.cs
- SequentialWorkflowHeaderFooter.cs
- GC.cs
- TextPattern.cs
- SymbolEqualComparer.cs
- OleDbParameter.cs
- Control.cs
- COAUTHIDENTITY.cs
- HtmlInputButton.cs
- ChangePasswordAutoFormat.cs
- DataBoundLiteralControl.cs
- SoapSchemaImporter.cs
- X509SecurityToken.cs
- DocumentViewerHelper.cs
- GridItemCollection.cs
- Query.cs
- TextBoxLine.cs
- SessionStateModule.cs
- TemplatedWizardStep.cs
- Misc.cs
- PropertyGridView.cs
- PropertyIdentifier.cs
- HtmlImage.cs
- SynchronizationContext.cs
- AttributeProviderAttribute.cs
- XAMLParseException.cs
- ExpressionVisitor.cs
- QilPatternVisitor.cs
- NavigationProgressEventArgs.cs
- XmlElementList.cs