A similar question was asked and answered, but the answer is insufficient. My problem is with step #2 where First() is applied to the string array produced by Split(). First() not a legal method that applies to a string array in .NET. That will not compile in Vb.net.
First() is applicable to things such as List or a “sequence” in LINQ.
But somehow this statement works in the uiPath workflow! It will not compile in Vb.Net.
Can somebody explain if UiPath is casting this string array to a List or some other data type in the background?
Rather than VB.net, the example statement looks a lot like the fluent method syntax used in LINQ.
It seems that you have trouble getting an answer to your question in the first 24 hours.
Let us give you a few hints and helpful links.
First, make sure you browsed through our Forum FAQ Beginner’s Guide. It will teach you what should be included in your topic.
You can check out some of our resources directly, see below:
Always search first. It is the best way to quickly find your answer. Check out the icon for that.
Clicking the options button will let you set more specific topic search filters, i.e. only the ones with a solution.
Topic that contains most common solutions with example project files can be found here.
Read our official documentation where you can find a lot of information and instructions about each of our products:
Meet us and our users on our Community Slack and ask your question there.
Hopefully this will let you easily find the solution/information you need. Once you have it, we would be happy if you could share your findings here and mark it as a solution. This will help other users find it in the future.
Thank you for helping us build our UiPath Community!
I did all those things. The question remains unanswered. In Stack Overflow, I would get the Tumbleweed badge! Your course would be improved if the code portions in technical solutions were explained.
Module Program
Sub Main(args As String())
Dim str() As String =
{"First", "Second"}
Dim str2 As String
Dim first As String = str.First()
str2 = "Another string"
Console.WriteLine(first)
Console.WriteLine(str2.Split(" "c).First())
End Sub
End Module
Visual Basic.Net Compiler version 0.0.0.5943 (Mono 4.6 - tarball)
Copyright (C) 2004-2010 Rolf Bjarne Kvinge. All rights reserved.
/home/main.vb (14,35) : error VBNC30456: ‘First’ is not a member of ‘System.String’.
/home/main.vb (18,44) : error VBNC30456: ‘First’ is not a member of ‘System.String’.
There were 2 errors and 0 warnings.
As I mentioned, a String array has no “First” method.
Uipath academy has gone worst after recent updates ,the speaker just doesn’t explain what he is doing and someone like me who is a new learner has to go through multiple links to understand a single step.
even by now I haven’t understood why he used “First” in this activity message.Split("."c).First.ToString.Substring(message.LastIndexOf(“author”))
Yeah, many loose ends. I think they follow the “if it doesn’t kill you it makes you stronger” approach. It does encourage lots of searching and document finding. This section says it takes 6 hours but I did all the practices on my own without looking at the solutions and it took me more like 6 days. Slowing down the video playback speed can be helpful sometimes.