Performance - Properties vs Methods

  • Thread starter Thread starter Tom Bean
  • Start date Start date
T

Tom Bean

In C#, is there any difference in the performance of using a property to get
the value of a member variable versus calling a method to retrieve the
value?

Thanks,
Tom
 
Tom,

I don't see why there would be. Underneath it all, properties are
really methods, just with a particular naming scheme.

Hope this helps.
 
Nicholas Paldino said:
Tom,

I don't see why there would be. Underneath it all, properties are
really methods, just with a particular naming scheme.

Hope this helps.

Hopefully they both get inlined if simple enough...
-mike
 
Back
Top