错误没有签名兼容的混淆 [英] Error does not have a signature compatible confusion

查看:83
本文介绍了错误没有签名兼容的混淆的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我开始通过线程进行基本操控。但是,有一点我很困惑的是设置sub来在UI上完成工作。



发生了什么,我需要保持0的值或者1.这告诉下一个子选择文本输入的前景是什么。



我有设置了resbtextred子设置所以它应该从append sub接收line和selectcolor整数。但是,它出现了说方法



'Private sub settbtextred(行为字符串,selectcolor为整数)'没有与委托'委托子动作兼容的签名(字符串)(obj as string)



我不知道这个错误信息是什么意思?



I'm starting to get to "basic" grips with threading. But, one thing I am confused about is setting up the sub to do the work on the UI.

What is happening, is I need to hold a value of 0 or 1. This tells the next sub what forecolor the selection text is being input into.

I have the settbtextred sub setup so it should receive from the append sub both the line, and the selectcolor integer. But, it comes up saying the method

'Private sub settbtextred(line as string, selectcolor as integer)' does not have a signature compatible with delegate ' delegate sub action (of string)(obj as string)

I have no idea what this error message means?

Private Sub append(ByVal datastring As String)
        Dim selectcolor As Integer
        Dim linecount As Integer = 0
        Dim strreader As New StringReader(datastring)
        Dim line As String
        Do
            linecount = linecount + 1
            line = strreader.ReadLine()
            If line.Contains("xred") Then
                selectcolor = 0
                line = ("")
                settbtextred(line, selectcolor)
            End If
            If line.Contains("xblk") Then
                selectcolor = 1
                settbtextwhite(line)
            End If
            settbtextwhite(line)
        Loop Until linecount = 30
    End Sub
    Private Delegate Sub setbtextredinvoker(ByVal line As String, ByVal selectcolor As Integer)
    Private Sub settbtextred(ByVal line As String, ByVal selectcolor As Integer)
        If currenttb.InvokeRequired Then
            currenttb.Invoke(New Action(Of String)(AddressOf settbtextred), line, selectcolor)

        Else : currenttb.SelectionColor = Color.Red
            currenttb.AppendText(line)
        End If
    End Sub

推荐答案

这篇关于错误没有签名兼容的混淆的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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