Property access

Here's my setup.

public abstract class RateLabelBase

protected int mRateId = 0;

            public int rateId {
                  get { return mRateId; }
                  set {
                        if(value != mRateId) {
                              mRateId = value;
                        }
                  }
            }

*********************

public class RateLabel : RateLabelBase{ .... }

*********************

      [TestFixture]
      public class RateLabelUnitTest
      {
            [Test]
            public void testRate(){
                  RateLabel rl = new RateLabel();
                  
                  rl.rateId = 4;
                              }
                }

********************

it's saying that rl.rateId is not a member. What's up with this?

the ******** mean file delimitations
LVL 3
jayrodAsked:
Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

muzzy2003Commented:
What's in RateLabel? Can you post this, and also the actual code for RateLabelBase not the version you've given?
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
gelbertCommented:
mRateId is declared as PROTECTED ( it could be only used inside derived class), Change declaration to PUBLIC to be able to access it outside class code
0
gelbertCommented:
Opps, sorry please disregard post above. I have looked at wrong line....
0
Cloud Class® Course: C++ 11 Fundamentals

This course will introduce you to C++ 11 and teach you about syntax fundamentals.

muzzy2003Commented:
He's not trying to access mRateId directly, he's using a property accessor which is public.
0
muzzy2003Commented:
Sorry, crossed with your last post. :)
0
jayrodAuthor Commented:
I forgot to add a fricken referrence to the new dll.. gawd
0
muzzy2003Commented:
Can you remove the accepted answer please? You've solved the problem yourself, and should open the question and just get the points refunded. Check here for details:

http://www.experts-exchange.com/help.jsp#hi17

I certainly don't want a C grade down on the record.
0
jayrodAuthor Commented:
doh.. how do I undo it?
0
muzzy2003Commented:
Go to the link I posted, it'll tell you. You need to make a post in Community Support.
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
C#

From novice to tech pro — start learning today.

Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.