Quantcast
Channel: UiPath Community Forum - Topics tagged error
Viewing all articles
Browse latest Browse all 4384

Invoke Code syntax error

$
0
0

@carlor wrote:

Hi there,

I’m trying create a piece of code to do some string find/replace using InvokeCode but I’m running into a syntax error that I can’t figure out.

Dim test01 As String = “#first string# here is some text #second string# and more text”
Dim test02 As String = “#first string# here is some more text I don’t care about”
Dim items As New System.Collections.Generic.List(Of Integer)
items = test01.Select(Function(c, i) New With {.Character = c, .Index = i}) _
.Where(Function(item) item.Character = “#”) _
.ToList
Dim count As Integer = items.Count

This works in Visual Studio but I’m getting an error message that on the “items =” line: the List(Of anonymous type) can’t be converted to List(Of Integer)

Any ideas?

Thanks,

Carlo.

Posts: 8

Participants: 3

Read full topic


Viewing all articles
Browse latest Browse all 4384

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>