[英]“Type mismatch” error when calling a simple method in a c# assembly registered for COM interop
I've build a classlibrary using c# and the .net framework 3.5.我使用 c# 和 .net 框架 3.5 构建了一个类库。 In my class library there is a class called Utilities with two methods.在我的 class 库中,有一个名为 Utilities 的 class 有两种方法。
public string Method1(int length)
{
}
public string Method2(int length, string aStringParameter)
{
}
Now I went and build a simple asp page calling my methods.现在我去构建一个简单的 asp 页面来调用我的方法。 Method1 work like a charm. Method1 像魅力一样工作。 Method2 causes a "Type Mismatch" error. Method2 导致“类型不匹配”错误。 What am I missing here?我在这里想念什么?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.