gpt4 book ai didi

asp.net - BC30057 : To many arguments

转载 作者:行者123 更新时间:2023-12-03 22:10:12 25 4
gpt4 key购买 nike

问题突然出现,我不知道为什么会出现问题以及如何解决它。

编译错误

说明:编译服务此请求所需的资源期间发生错误。请查看以下特定错误详细信息并适当修改您的源代码。

编译器错误消息: BC30057:'Public Sub New(ItemNo As String, POLineMatch As String, ItemNumberPartCode As String, QuantityInvoiced As String, UnitPriceInvoiced As String, ExtendedPrice As String, ItemTax As String, Notes As String)'的参数太多。

这是代码:

Partial Class Plugins_NonPO_GLCoding
Protected Sub Page_Init(ByVal sender As Object, ByVal e As System.EventArgs) Handles Me.Init
If Me.InvoiceItemsDV.Table.Rows.Count > 0 Then
For i As Integer = 0 To Me.InvoiceItemsDV.Table.Rows.Count - 1
Dim ItemNo As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("ItemNo"))
Dim POLineMatch As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("POLineMatch"))
Dim ItemNumberPartCode As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("ItemNumberPartCode"))
Dim QuantityInvoiced As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("QuantityInvoiced"))
Dim UnitPriceInvoiced As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("UnitPriceInvoiced"))
Dim ExtendedPrice As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("ExtendedPrice"))
Dim GLAccount As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("GLAccount"))
Dim ItemTax As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("ItemTax"))
Dim Notes As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("Notes"))
Dim ItemTaxCode As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("ItemTaxCode"))
Dim Department As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("Department"))
Dim ShipToCode As String = Me.NullCheck(Me.InvoiceItemsDV.Table.Rows(i)("ShipToCode"))
Me.InvoiceItems.Add(New InvoiceItems(ItemNo, POLineMatch, ItemNumberPartCode, QuantityInvoiced, UnitPriceInvoiced, ExtendedPrice, GLAccount, ItemTax, Notes, ItemTaxCode, Department, ShipToCode))
Next
End If
End Sub
End Class

Public Class InvoiceItems
Private _ItemNo As String
Private _POLineMatch As String
Private _ItemNumberPartCode As String
Private _QuantityInvoiced As String
Private _UnitPriceInvoiced As String
Private _ExtendedPrice As String
Private _GLAccount As String
Private _ItemTax As String
Private _Notes As String
Private _ItemTaxCode As String
Private _Department As String
Private _ShipToCode As String
Public Sub New(ByVal ItemNo As String, ByVal POLineMatch As String, ByVal ItemNumberPartCode As String, ByVal QuantityInvoiced As String, ByVal UnitPriceInvoiced As String, ByVal ExtendedPrice As String, ByVal GLAccount As String, ByVal ItemTax As String, ByVal Notes As String, ByVal ItemTaxCode As String, ByVal Department As String, ByVal ShipToCode As String)
Me._ItemNo = ItemNo
Me._POLineMatch = POLineMatch
Me._ItemNumberPartCode = ItemNumberPartCode
Me._QuantityInvoiced = QuantityInvoiced
Me._UnitPriceInvoiced = UnitPriceInvoiced
Me._ExtendedPrice = ExtendedPrice
Me._GLAccount = GLAccount
Me._ItemTax = ItemTax
Me._Notes = Notes
Me._ItemTaxCode = ItemTaxCode
Me._Department = Department
Me._ShipToCode = ShipToCode
End Sub
Public Property ItemNo() As String
Get
Return Me._ItemNo
End Get
Set(ByVal value As String)
Me._ItemNo = value
End Set
End Property
' There are too many get sets so i deleted them out and left one for example
End Class

一切正常,甚至在我的重复机器上一切正常,它应该如何工作,弹出此错误的原因是什么?

最佳答案

看来你的构造函数不一样:

From error: Public Sub New(ItemNo As String, POLineMatch As String, ItemNumberPartCode As String, QuantityInvoiced As String, UnitPriceInvoiced As String, ExtendedPrice As String, ItemTax As String, Notes As String)
From code: Public Sub New(ByVal ItemNo As String, ByVal POLineMatch As String, ByVal ItemNumberPartCode As String, ByVal QuantityInvoiced As String, ByVal UnitPriceInvoiced As String, ByVal ExtendedPrice As String, ByVal GLAccount As String, ByVal ItemTax As String, ByVal Notes As String
, **ByVal ItemTaxCode As String, ByVal Department As String, ByVal ShipToCode As String**)

我想你必须在重新编译之前清理你的解决方案。如果它不起作用,请找到您在机器上编译的所有 dll 并将它们从您的机器中删除。可能存在未正确清理的 dll。或者您显示的代码可能不是导致错误的原因。

关于asp.net - BC30057 : To many arguments,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/14395997/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com