Problem Creating new Dictionary variable

Dear all

i wanto creat new variable as dictionary type
in default field, i input command : new Dictionary(of String, Int32) from {{“a”,3}, {“b”,5}}
but it not working.
i dont know how to edit that command.
Please helpme.
thank you so much

Hi @TienGiang

The Initialization of Dictionary is Right
May be the Late binding u can get that error.
u can refresh your Workflow and try this code:

> New Dictionary(Of String, Int32) From{{"a",3},{"b",5}}

If possible: Could u please share what is the error u have faced in the variable panel.

Regards,
VP

1 Like

Hi,

If your project is C#, the following expression will work.

new Dictionary<string, Int32>(){{"a",3}, {"b",5}}

Regards,

2 Likes

Yoichiさん

いつもお世話になっております。Giangです。
教えていただいた通りに修正できました。
ありがとうございました。

今後ともよろしくお願いいたします。
giang nguyen

1 Like

@Vishnuraj_Pandiyarajan2
thank you for your comment.
base on mr.Yoichi’s suggesion, i fixed that error .

(i created project using #C instead of VB., therefore the expression: new Dictionary<string, Int32>(){{“a”,3}, {“b”,5}} did not work )

Regards,
giang nguyen

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