IEnumerable<TextInfo>の初期化方法

System.Collections.Generic.IEnumerable<UiPath.Core.Textinfo>という型のデータの
初期化をしようとしています。

testdata = New TextInfo(){}
testdata = {{Color=0, Region=Region { Rectangle=[{X=49,Y=223,Width=80,Height=23}] }, Text=“(IMEN0045)”}}

1行目でnewして、2行目で具体的なデータを1つセットしました。
2行目で以下のエラーが出ます。

式"{{Color=0, Region=Region { Rectangle=[{X=49,Y=223,Width=80,Height=23}] }, Text=“(IMEN0045)”}}"の処理中にコンパイルエラーが発生しました。'}'が必要です。

半日考えていましたが、解決できませんでした。
ご指導よろしくお願いいたします。

こんにちは

testdata = New TextInfo("(IMEN0045)",New Rectangle(49,223,80,23))

をお試しください。

Yoichi様
いつもご指導ありがとうございます。
早速つかわせていただきました。
うまくいきました。

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