Are implicit operators and TypeConverters equivalent?

前端 未结 4 2534
傲寒
傲寒 2021-02-20 09:57

It seems to me its very easy to implement an implicit operator versus a TypeConverter, so I\'m assuming they aren\'t equivalent because of the prevalence of TypeConverters in th

4条回答
  •  忘了有多久
    2021-02-20 10:40

    Just curious: TypeConverters can work with the visual studio designer, such that if you provide the right TypeConverter for a properties like Lists or Arrays you can set them via the designer. Do implicit operators also provide this service? If not, I suspect that answers your question: they're used in the framework so that controls using those items can work with the designer.

提交回复
热议问题