Top "Properties" questions

A property, in some object-oriented programming languages, is a special sort of class member, intermediate between a field (or data member) and a method.

Using @property versus getters and setters

Here is a pure Python-specific design question: class MyClass(object): ... def get_my_attr(self): ... def set_my_attr(self, …

python properties getter-setter
Dynamically access object property using variable

I'm trying to access a property of an object using a dynamic name. Is this possible? const something = { bar: "Foobar!" }; …

javascript object properties
How to create an object property from a variable value in JavaScript?

I want to add a new property to 'myObj', name it 'string1' and give it a value of 'string2…

javascript properties object
Reading Properties file in Java

I have the following code trying to read a properties file: Properties prop = new Properties(); ClassLoader loader = Thread.currentThread().getContextClassLoader(); …

java properties
Getting the object's property name

I was wondering if there was any way in JavaScript to loop through an object like so. for(var i …

javascript object properties
How to use Java property files?

I have a list of key/value pairs of configuration values I want to store as Java property files, and …

java properties
Can I update a component's props in React.js?

After starting to work with React.js, it seems like props are intended to be static (passed in from the …

javascript reactjs properties
How to set a Javascript object values dynamically?

It's difficult to explain the case by words, let me give an example: var myObj = { 'name': 'Umut', 'age' : 34 }; var prop = …

javascript object properties set
Set object property using reflection

Is there a way in C# where I can use reflection to set an object property? Ex: MyObject obj = new …

c# .net reflection properties
Test for existence of nested JavaScript object key

If I have a reference to an object: var test = {}; that will potentially (but not immediately) have nested objects, something …

javascript object properties nested