tlbexp.exe changes method names' case

℡╲_俬逩灬. 提交于 2019-12-04 07:09:04

Since COM is case-insensitive, both "RandomClass" and "randomClass" are the same symbol in the output library's table. (This is part of the reason why the .NET guidelines recommend PascalCasing for class names and methods.)

The one that gets chosen will be the first one the compiler emits, and this is fairly non-deterministic from a programmer's point of view!

You can choose one or the other, using tlbexp's /names parameter, but both casings cannot co-exist in the library.

To use tlbexp's names file, you simply create a file with a list of identifiers, one per line:

RandomClass
SomeOtherIdentifier

Then you call it like so:

tlbexp MyAssembly.dll /names=MyNames.txt

tlbexp will then use the version of the symbol defined in the names file.

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