Page 1 of 1

using c# methods that return values?

Posted: Wed Jan 08, 2014 7:27 pm
by godzillajoe
<deleted>

Re: using c# methods that return values?

Posted: Thu Jan 09, 2014 1:44 pm
by MarkusT
Hello godzillajoe,

You could create a variable (e.g. varTime) in your recording and use the following method to assign the value:
public void SetTime()
{
	varTime = System.DateTime.Now.ToShortTimeString();
}
Simply call this User Code method within your recording and use this variable for your actions (see below).
ActionsTable.PNG
You could create a library with methods and reference it in your other projects to access it.
Please note that you would need to write User Code to handle return values since these values are ignored in the recording.

Please let me know if you need further information.

Regards,
Markus (T)

Re: using c# methods that return values?

Posted: Thu Jan 09, 2014 2:52 pm
by godzillajoe
Thanks Markus, I think this is enough to keep me moving forward.