Trying to implement CanConvertTo-method derived TypeConverter class

  • Thread starter Thread starter Benny C. Mildh
  • Start date Start date
B

Benny C. Mildh

Hi!

I'm trying to implement my own CanConvertTo-method from the derived
TypeConverter class.

Public Overrides Function CanConvertFrom(ByVal context As
ITypeDescriptorContext, ByVal sourceType As Type) As Boolean

However, I do get an error message saying:

"function 'CanConvertFrom' cannot be declared Overrides because It does
not override a function in a base class."

Looking to MSDN, It looks to me like I've matched the base class
signature for this method.

If anyone could shed some light over this I'd be most appreciated.


Regards
 
I'm trying to implement my own CanConvertTo-method from the derived
TypeConverter class.

If anyone could shed some light over this I'd be most appreciated.

At the top of your class do you have"

Inherits ExpandableObjectConverter

?

--
Chris

dunawayc[AT]sbcglobal_lunchmeat_[DOT]net

To send me an E-mail, remove the "[", "]", underscores ,lunchmeat, and
replace certain words in my E-Mail address.
 
Chris said:
At the top of your class do you have"

Inherits ExpandableObjectConverter

?
No. I have "Ineherits TypeConverter". However, I think I've found the
problem: I forgot to include the keyword "overloads" in the signature.
It works better now. ;)
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top