public sealed class Add : CodeActivity<int> {                    [RequiredArgument]     public InArgument<int> Operand1 { get; set; }                     [RequiredArgument]     public InArgument<int> Operand2 { get; set; }      protected override int Execute(CodeActivityContext context)     {         return Operand1.Get(context) + Operand2.Get(context);     } }             

在 XAML 中,也请使用 RequiredArgumentAttribute 来指示所需参数。下面的示例定义了一个含有三个参数的 Add 活动,并使用 Assign 活动执行添加操作。

相关文章:

  • 2022-12-23
  • 2021-06-16
  • 2021-07-04
  • 2021-06-25
  • 2022-01-06
  • 2022-12-23
  • 2021-09-15
  • 2022-12-23
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2022-01-19
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案