Re: Unexcepted warning in ranorex class

Ask general questions here.
Harshal Joshi
Posts: 22
Joined: Tue Oct 18, 2011 10:03 am

Re: Unexcepted warning in ranorex class

Post by Harshal Joshi » Wed Nov 02, 2011 12:00 pm

Hi,
I have created a new project named sample_demo_marketsiq. I have created a new class in sample_demo_marketsiq named TestCase. In that, I have declared some variables. But when I am running the projects I am getting some warning. My code looks like this:

public class TestCase
{
ListItem item;
double Amount;
int StrikePoints;
....................
....................
code here
....................
.....................
}
I am getting following warnings.
The field 'sample_demo_marketsiq.TestCase.item' is never used(CS0169).
The field 'sample_demo_marketsiq.TestCase.Amount' is never used(CS0169)
The field 'sample_demo_marketsiq.TestCase.StrikePoints' is never used(CS0169)

Please suggest me what should I do?

User avatar
Support Team
Site Admin
Site Admin
Posts: 11709
Joined: Fri Jul 07, 2006 4:30 pm
Location: Graz, Austria

Re: Unexcepted warning in ranorex class

Post by Support Team » Wed Nov 02, 2011 1:08 pm

Hi,

If you don't use your fields inside your code you get this warning (compiler warning). As mentioned in the other thread, I would suggest you to read the Ranorex User Guide and if you are a beginner in C# or VB .Net, it is also very helpful to start a C# or VB tutorial.

Regards,
Peter
Ranorex Team
.
Image

Harshal Joshi
Posts: 22
Joined: Tue Oct 18, 2011 10:03 am

Re: Unexcepted warning in ranorex class

Post by Harshal Joshi » Thu Nov 03, 2011 5:13 am

Thank you for help. I got the solution for problem.