what are the differences between property and local variable in C#???
Amit Soni
Select an image from your device to upload
Main differences between property and local variable ( Though I believe comparing property and member variable is more approprate.)
Local variable is declared as a single statement whereas property is a series of statmenets.
Local variable is declared in procedure and scope remains within procedure whereas Property is associated with a class or module.
Local variables has write and read methods whereas property has get and set methods.
Local Variable is stored at a specific memory location and it can be accessed with memory operations. Property value may or may not be accessed.