Control.Invoke with input Parameters

后端 未结 8 596
时光说笑
时光说笑 2020-12-08 05:24

From what I\'ve found in C#, the Control.Invoke method requires that you use a delegate with no input parameters. Is there any way around this? I would like to invoke a me

8条回答
  •  感情败类
    2020-12-08 06:03

    Here ya go using lambda expressions with the Invoke() extension + an input parameter.

    Using: action(STARS db)

    _ccb.GetImagerFRU_PartNbr().Invoke(new Action(dbase => _ccb.GetImagerFRU_PartNbr().Text = dbase.PartNumber(serial) ?? String.Empty), db);
    

提交回复
热议问题