studio
latest
false
重要 :
このコンテンツの一部は機械翻訳によって処理されており、完全な翻訳を保証するものではありません。 新しいコンテンツの翻訳は、およそ 1 ~ 2 週間で公開されます。
UiPath logo, featuring letters U and I in white

Studio User Guide

最終更新日時 2025年9月29日

ST-REL-001 - Mismatched argument types

Rule ID: ST-REL-001

Scope: Coded workflow

Description

This rule ensures that the argument types of In/Out parameters are matching. For example, errors are highlighted when a DataTable is used as an output parameter for the Execute method, if the matching input parameter is a DataSet.
For instance, in the following code example, the same isConnected parameter is declared as bool, and then as an int. To resolve this, make sure the same type is used for the isConnected parameter both as input and output.
public (bool IsConnected, string Name) Execute(int IsConnected, int32 Name)
        {
            return (true, "Jade");
        }public (bool IsConnected, string Name) Execute(int IsConnected, int32 Name)
        {
            return (true, "Jade");
        }

Recommendation

We recommend to make sure that the data types for In/Out arguments always match. If the method returns a tuple, such as in public (bool IsConnected, string Name) Execute(int IsConnected, int32 Name), an In/Out argument must still be declared both before and after the method. In this case, IsConnected is the In/Out argument as it is declared twice.
On the other hand, when the method returns a single argument as in the example public int Execute(int Output, int c), you can declare an In/Out argument by naming it Output. Naming any argument as Output treats it as an In/Out argument, even if it's only declared once in the method.
  • Description
  • Recommendation

このページは役に立ちましたか?

サポートを受ける
RPA について学ぶ - オートメーション コース
UiPath コミュニティ フォーラム
Uipath Logo
信頼とセキュリティ
© 2005-2025 UiPath. All rights reserved.