About 45,200,000 results
Open links in new tab
  1. How does the @property decorator work in Python?

    I would like to understand how the built-in function property works. What confuses me is that property can also be used as a decorator, but it only takes arguments when used as a built-in function ...

  2. Get name of property as a string - Stack Overflow

    Learn how to retrieve the name of a property as a string in C programming language.

  3. How to implement a property in an interface - Stack Overflow

    In the interface, there is no code. You just specify that there is a property with a getter and a setter, whatever they will do. In the class, you actually implement them. The shortest way to do this is using …

  4. python - How to make a class property? - Stack Overflow

    Descriptors like property need to be in the type's dictionary to work their magic. So those in a class definition primarily affect the behaviour of instances of the class, with minimal effect on the behaviour …

  5. How can I check if an object has an attribute? - Stack Overflow

    How do I check if an object has some attribute? For example: >>> a = SomeClass() >>> a.property Traceback (most recent call last): File "<stdin>", line 1, in <module> AttributeError: SomeClass …

  6. How to fix "The ConnectionString property has not been initialized"

    How to fix "The ConnectionString property has not been initialized" Asked 16 years, 5 months ago Modified 3 months ago Viewed 512k times

  7. What does the => operator mean in a property or method?

    In my situation I had my property auto initialize a command in a ViewModel for a View. I changed the property to use expression bodied initializer and the command CanExecute stopped working. Here's …

  8. Conditionally required property using data annotations

    129 RequiredIf validation attribute I've written a RequiredIfAttribute that requires a particular property value when a different property has a certain value (what you require) or when a different property …

  9. Sorting an array of objects by property values - Stack Overflow

    27 I recommend GitHub: Array sortBy - a best implementation of sortBy method which uses the Schwartzian transform But for now we are going to try this approach Gist: sortBy-old.js. Let's create a …

  10. How to add property to a class dynamically? - Stack Overflow

    16 How to add property to a python class dynamically? Say you have an object that you want to add a property to. Typically, I want to use properties when I need to begin managing access to an attribute …