Retaining the value of variables across Classes

Ask general questions here.
Anbu
Posts: 15
Joined: Tue Feb 14, 2012 10:28 am

Retaining the value of variables across Classes

Post by Anbu » Wed Feb 15, 2012 2:09 pm

Hi All,

We want to retain the value of a variable from one class to another using VB.net code. Please could you advice us to handle this situation.

Thanks
Anbu K

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Retaining the value of variables across Classes

Post by Support Team » Wed Feb 15, 2012 3:24 pm

Hi,
Anbu wrote:We want to retain the value of a variable from one class to another using VB.net code. Please could you advice us to handle this situation.
Sorry but I have no clue what you are trying to do. Would it be possible to explain your use case in more detail?

Regards,
Peter
Ranorex Team

Anbu
Posts: 15
Joined: Tue Feb 14, 2012 10:28 am

Re: Retaining the value of variables across Classes

Post by Anbu » Thu Feb 16, 2012 7:53 am

Peter,

I am using a variable to store a value in a class1 and I would like to use the value of the variable in class2 without calling class1. I have tried static and few other options, however nothing works. Is there any other way we can use the variable with the value assgined in class1?

Thank you,
Anbu K

User avatar
Support Team
Site Admin
Site Admin
Posts: 12145
Joined: Fri Jul 07, 2006 4:30 pm
Location: Houston, Texas, USA
Contact:

Re: Retaining the value of variables across Classes

Post by Support Team » Thu Feb 16, 2012 1:37 pm

Hi,

Please take a look to following documentation
http://msdn.microsoft.com/en-us/library ... s.80).aspx

Regards,
Peter
Ranorex Team