Changing public field to property

  • Thread starter Thread starter desmcc
  • Start date Start date
D

desmcc

In a c# class, I have changed what was previously a public field to
become a property with the exact same name as the old field. (I have
renamed the old field). Does this break compatability in terms of
calling code calling the original class. What seems to be happening is
that the old calling code needs to be rebuilt to use the updated class.
Is the change I made a compatability issue ?

thanks for any light shed.

Des.
 
In a c# class, I have changed what was previously a public field to
become a property with the exact same name as the old field. (I have
renamed the old field). Does this break compatability in terms of
calling code calling the original class. What seems to be happening is
that the old calling code needs to be rebuilt to use the updated class.
Is the change I made a compatability issue ?

Yes, look in the MSIL to see the difference. FE, get_Foo and set_Foo.

-- Alan
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top