Top "Automatic-properties" questions

DefaultValue attribute is not working with my Auto Property

I have the following Auto Property [DefaultValue(true)] public bool RetrieveAllInfo { get; set; } when I try to use it inside …

c# properties attributes default-value automatic-properties
Why doesn't Java have automatic properties like C#?

C# has automatic properties which greatly simplify your code: public string Name { get; set; } public string MiddleName { get; set; } public …

c# java history language-design automatic-properties
Automatic Properties and Structures Don't Mix?

Kicking around some small structures while answering this post, I came across the following unexpectedly: The following structure, using an …

c# c#-3.0 struct automatic-properties
How to properly define class properties?

When defining a new class within a project what is the correct/best practice for doing so? In the past …

c# c#-3.0 properties automatic-properties
Automatically implemented property in struct can not be assigned

I have a next code: struct T { public T(int u) { this.U = 10; //Errors are here } public int U { get; …

c# .net constructor automatic-properties
Adding a setter to a virtual property in C#

I have a situation like this: public abstract class BaseClass { public abstract string MyProp { get; } } Now, for some of the …

c# .net properties automatic-properties
Are C# auto-implemented static properties thread-safe?

I would like to know if C# automatically implemented properties, like public static T Prop { get; set; }, are thread-safe or …

c# static thread-safety properties automatic-properties
Automatic variables in C++

Possible Duplicate: In C++, why should new be used as little as possible? Where are automatic variables allocated in C++? …

c++ memory heap-memory stack-memory automatic-properties
Getter without body, Setter with

I have a property which is currently automatic. public string MyProperty { get; set; } However, I now need it to perform …

c# automatic-properties
What's the best way to call INotifyPropertyChanged's PropertyChanged event?

When you implement the INotifyPropertyChanged interface, you're responsible for calling the PropertyChanged event each and everytime a property is updated …

c# .net .net-3.5 inotifypropertychanged automatic-properties