未为“公共子新建"(ComPortName作为字符串)的参数"ComPortName"指定参数 [英] Argument not specified for parameter 'ComPortName' of 'Public Sub New(ComPortName As String)

查看:86
本文介绍了未为“公共子新建"(ComPortName作为字符串)的参数"ComPortName"指定参数的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用COMPort开发应用程序.
应用程序成功执行.
但是添加引用时:-错误来了- 未为'Public Sub New(ComPortName As String)'的参数'ComPortName'指定参数 请指导如何解决.

I am working on an application using COMPort.
Application executed successfully.
But when adding a reference:- Error is coming-  Argument not specified for parameter 'ComPortName' of 'Public Sub New(ComPortName As String)'
Please guide how to resolve.

推荐答案

您可以在从当前项目中调用函数时发布正在使用的代码吗?下面是一个简单的项目,可以帮助您解决问题.

Can you post the code you are using when calling the function from your current project?  Below is a simple project that may help you solve the problem.

Module Module1    Sub Main()        Dim cPort As Port = New Port("abc")    End Sub    Class Port        Public Sub New(ByVal ComPortName As String)        End Sub    End ClassEnd Module


这篇关于未为“公共子新建"(ComPortName作为字符串)的参数"ComPortName"指定参数的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆