开发者

Can you work with char's in VBScript?

开发者 https://www.devze.com 2023-01-09 15:27 出处:网络
I have a .NET Class that contains a property that returns a char value. I am accessing this assembly using a VBScript via COM.

I have a .NET Class that contains a property that returns a char value. I am accessing this assembly using a VBScript via COM. When i attempt to read the property that is of type (char) I get an error in my VBScript that reads Variable uses an Automation type not supported in VBScript. How can I get around this error. Is there a way to do it without changing the datatype in th开发者_如何学Goe .NET assembly?


You have to cast the char type using the VBScript function chr(). like this: chr ID = chr(FW.WheelID) where WheelID is the property of type char of the object FW.

0

精彩评论

暂无评论...
验证码 换一张
取 消