About 15,600,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 …

  2. How to mock a readonly property with mock? - Stack Overflow

    If the object whose property you want to override is a mock object, you don't have to use patch. Instead, can create a PropertyMock and then override the property on the type of the mock. …

  3. 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 …

  4. What's the difference between a Python "property" and "attribute"?

    Sep 10, 2011 · The property allows you to use the former syntax while giving you the flexibility of change of the latter. In Python, you can define getters, setters, and delete methods with the …

  5. How to exclude property from Json Serialization - Stack Overflow

    I have a DTO class which I Serialize Json.Serialize(MyClass) How can I exclude a public property of it? (It has to be public, as I use it in my code somewhere else)

  6. How to sort List of objects by some property - Stack Overflow

    How to sort List of objects by some property Asked 14 years, 6 months ago Modified 2 years, 7 months ago Viewed 479k times

  7. error TS2339: Property 'x' does not exist on type 'Y'

    When accessing a property, the "dot" syntax (images.main) supposes, I think, that it already exists. I had such problems without Typescript, in "vanilla" Javascript, where I tried to access …

  8. 'Property does not exist on type 'never' - Stack Overflow

    May 24, 2017 · And the else part item.name said Property 'name' does not exist on type 'never'. Well this is because if there is nothing inside the item object - there can't be a name property …

  9. How to Sort a List<T> by a property in the object - Stack Overflow

    Jul 22, 2010 · The extension method takes the property you wish to sort as a parsed string and then uses the OrderBy method of the List<T>. Then it sets each index of the original list to the …

  10. c# - Get property of generic class - Stack Overflow

    I have a generic class, and an object value where obj.GetType().GetGenericTypeDefinition() == typeof(Foo<>). class Foo<T> { public List<T> Items { get; set; } } How do I get the value of …