Tony said:
Can somebody explain the difference between field and variables.
For me they are more or less the same.
Two words for ther same thing
The term field refers to a part of a bigger structure, like a database
record or a C# struct or class. The term variable just means that it can be
modified. Database people generally talk about fields as part of a table
definition.
Another term is "members". This also implies "tied to some bigger
structure", like field, but is a broader term for methods are also
considered members. It just depends on your angle.
In older languages you can have variables that are independent of any class.
Variables declared locally are not members, they live inside the scope of a
method ut aren't part of the class definition. Constant members and methods
are not variables.
Another comparison: arguments versus parameters. There is probably a similar
subtle difference between those. My Greek of Latin is not good enough to
explain this.
Martin.