LINQのデバッグをご支援ください

こんにちは
UiPath Studio 2025.0.161 community editionのユーザです。

LINQでdt_inputを辞書変数dic_messageに代入しようとしましたが、静的エラーが発生しました。
どこをどう修正すればよいでしょうか?

dic_messageの変数の型はDictionary<String, Object>です。

dt_input
|Code|Level|Message|
|A001|Error|RPA実行異常終了しました。|
|A002|Error|異常終了:UiPath.Presentations.Activitiesファイルのパスが無効です。|
|A003|Info|ErrorHandler_Terminate:Ended|

dic_message = dt_input.AsEnumerable().ToDictionary(Function(row) row("Code").ToString, Function(row) New Object() {row("Level").ToString, row("Message").ToString})

Hi @gorby,

Use below syntax


dt_input.AsEnumerable().ToDictionary(Function(row) row("Code").ToString,  
                                    Function(row) CType(New List(Of Object) From {row("Level").ToString, row("Message").ToString}, Object))
1 Like

This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.