victoriaharry
asked on
C# - including string variable in code (bypass intellisense)
Hi,
I have a line of code which I will not know the operation name until runtime when the user passes it in via a parameter.
The code example is
The part after Output. (ResultMessage in the example above) is what can change. Is it possible to use a variable in the line of code so it will dynamically run depending on what the user passes into the application. For example, something like below
this.CodeAcvtivity10.Outpu t.myVariab le = resultMessage;
I hope this makes sense. Basically I'm automating some testing using UFT which is written C# and I have a common component which the users can setup there own input and output parameters. The Output parameter can be called anything so I need a way for the code to write to the output parameter entered by the user. The first code example above will write to an output parameter called 'ResultMessage'
Thanks
Gavin
I have a line of code which I will not know the operation name until runtime when the user passes it in via a parameter.
The code example is
this.CodeAcvtivity10.Output.ResultMessage = resultMessage;
The part after Output. (ResultMessage in the example above) is what can change. Is it possible to use a variable in the line of code so it will dynamically run depending on what the user passes into the application. For example, something like below
this.CodeAcvtivity10.Outpu
I hope this makes sense. Basically I'm automating some testing using UFT which is written C# and I have a common component which the users can setup there own input and output parameters. The Output parameter can be called anything so I need a way for the code to write to the output parameter entered by the user. The first code example above will write to an output parameter called 'ResultMessage'
Thanks
Gavin
ASKER
ok thanks,
If the member exist how would I then save a string to it ( this.CodeAcvtivity10.Outpu t.ResultMe ssage = resultMessage;)
Appreciate your assistance
Thanks
If the member exist how would I then save a string to it ( this.CodeAcvtivity10.Outpu
Appreciate your assistance
Thanks
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Open in new window
Read here how to check what type the member is (method, property, etc)