How do I call .NET code (C#/vb.net) from vbScript?

后端 未结 3 1624
北荒
北荒 2021-02-04 18:59

I imagine I can compile a C# DLL and then expose it as a COM object so that it can be CreateObject\'d from VBscript. I\'m just not sure the steps involved in doing this...

3条回答
  •  无人共我
    2021-02-04 19:01

    There's a "COM Accessible" option for each project you can select. Then, of course, you have to register the assembly to use it, but that's about it.


    I had to go hunting a bit to find it for C# (I'm used to VB.Net), but you can find the option by double-clicking on the Properties folder in the Solution Explorer, choosing the Application tab and then clicking the Assembly Information... button.

提交回复
热议问题