Using StatePrinter from VB rather than C# to implement ToString

懵懂的女人 提交于 2019-12-09 04:04:27

It is near impossible to use this directly in VB and get around the ambiguous name issue. You could write a class library wrapper in C# that doesn't expose this mismatch (that is, it has an internal StatePrinter object and exposes constructors that are PascalCased the same.

Another option would be to use reflection in the VB project to get around the case insensitivity.

You could also create a GitHub issue. Or, be a contributor to the project and create a suggested fix for it. :)

Anne Gunn

As soon as I got done writing #1 in the question above, I was able to figure out how to search for the answer to that bit.

Yes, VB is case insensitive, at least, as far as it needs to be in this case: See the rather nice writeup here: https://stackoverflow.com/a/2301980/165164

So, we're left with the rather plaintive: is no one else using StatePrinter from VB?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!