DataFieldConverter.CanConvertFrom(ITypeDescriptorContext, Type) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Gets a value indicating whether the specified source type can be converted to the type of the associated control property. This API is obsolete. For information about how to develop ASP.NET mobile applications, see Mobile Apps & Sites with ASP.NET.
public:
override bool CanConvertFrom(System::ComponentModel::ITypeDescriptorContext ^ context, Type ^ sourceType);
public override bool CanConvertFrom (System.ComponentModel.ITypeDescriptorContext context, Type sourceType);
override this.CanConvertFrom : System.ComponentModel.ITypeDescriptorContext * Type -> bool
Public Overrides Function CanConvertFrom (context As ITypeDescriptorContext, sourceType As Type) As Boolean
Parameters
- context
- ITypeDescriptorContext
An ITypeDescriptorContext object that represents the data-bound component or the control that the property belongs to.
- sourceType
- Type
The type to convert from.
Returns
true
if sourceType
is a string; otherwise false
.
Remarks
Note
You typically do not access a type converter directly. This implementation of TypeConverter is intended for use by a data-bound control at design time, and is instantiated with a TypeConverterAttribute on a property.
Applies to
See also
Feedback
https://aka.ms/ContentUserFeedback.
Kommer snart: I hele 2024 udfaser vi GitHub-problemer som feedbackmekanisme for indhold og erstatter det med et nyt feedbacksystem. Du kan få flere oplysninger under:Indsend og få vist feedback om