Get Started With RPA Development Course - row["Name"].ToString().Split(" "c)(0) error The Name 'c' does not exist in current context

I’m trying to complete the “Get Started with RPA Development” section from the Academy Course with a C# project but I cannot get past the following two errors for the text in the “Type Into” line, row[“Name”].ToString().Split(" "c)(0).

  • Syntax error, ‘,’ expected
  • The Name ‘c’ does not exist in current context

This is the Sequence. It is failing in the For Each Row of Data Table activity

I can get no errors with just typing the row[“Name”].ToString()

if I remove the “c” then the line, row[“Name”].ToString().Split(" ") generates the error, "cannot convert from ‘string’ to ‘char’

This is a cast issue in that Split expects a Char so the " " need to be cast as a char, and I’m assuming the “c” in the Split(" "c) it meant to tell C# that this is a char type.

What needs to be entered into the “type Into” activity so that the Name field in the data table for the row is split into two elements so that the first name can be extracted and entered into the RPA Challenge website?

Adding the (0) to the end does seem to impact the errors, just in case someone suggests adding the (0) to the end

Thanks in advance for the assistance

Shane

Hi,

The following post will help you.

Regards,