Question

1
Replies
444
Views
agranque Member since 2017 7 posts
Sun Life Financial Inc
Posted: 2 years ago
Last activity: 2 years 4 months ago
Closed

params keyword

I am trying to implement a method that has params (C#'s version of Java's varargs) keyword (which, I believe, works like the Concat method in stringUtils), so I can add an unlimited number of strings to a method as input parameters. Take this as an example:

public string ShowParamsExample(params string[] sample){ return sample[0];}

PRS validates it, but when I debug it, it says that the "sample" object has not been instantiated. I also observed that the exception says (in this case):
Object has not been instantiated [some exception messages] on method ShowParamsExample(String[] sample) [line number], etc.

So, my question is, is "params" supported in PRS?

Robotic Process Automation
Moderation Team has archived post
Share this page LinkedIn