Questions tagged [automatic-properties]

219 questions
0
votes
2 answers

How to get OnPropertyChanging event when use NotifyPropertyWeaver?

I use NotifyPropertyWeaverMsBuildTask to handle NotifyPropertyChanged for automatic properties. I know OnPropertyChanged() method rise when Property value is changed. But when this method is called value of property is changed and old value is lost.…
Amir Borzoei
  • 670
  • 2
  • 9
  • 30
0
votes
1 answer

How Do I Stop Visual Studio from Generating property setting for the controls in designer?

In Visual Studio 2008, when I add some controls to form the designer creates some codes regarding the properties of the control automatically. Now, I'm using my own user controls and by adding them to the form, the designer again creates the code…
-1
votes
1 answer

Assign macro to shape, stop automatic updating

In Excel, I have a dropdown list in cell C6. A user then inputs a numerical value into cell C10. I then have 4 dependent cells (dependent on cells C6, and the value inputted into cell C10), in C13, C17, C18 and C19. 2 of these cells (C17, C18)…
-1
votes
1 answer

Difference between two class definitions in c#

Failing finding an answer I can understand, could someone explain the difference between the following: // One private Guid mCategoryID; public Guid CategoryID { get { return mCategoryID; } set { mCategoryID =…
-1
votes
1 answer

automatic timestamp script for each row

I'm looking for a script for google sheet that automatically inserts a timestamp for each row. and the date and time will be updated every time any of the rows gets edited. Timestamp will be put on column 1 and the rows can be the whole rows after…
-1
votes
2 answers

Object fingerprinting: serialization + untouchable legacy code + Getter-only auto-properties = cornered?

I have found myself cornered, so here we go. Context I need to produce a fingerprint hash code for object diffing. Comparing the hashes of two sets of objects will need to tell me if there are identical objects with the same hash. The fingerprint…
-1
votes
3 answers

Auto-property default value

Can I generate in C# auto-property with default value? public class MyClass { MyClass() { Reason = "my reason"; } public string Reason{ get; set; } }
YAKOVM
  • 9,805
  • 31
  • 116
  • 217
-1
votes
1 answer

Is there a shortcut to declaring multiple similar automatic properties in c#

For instance, I want to declare properties, all of which are strings: I tried public string p1, p2, p3 { get; set; } Obviously this does not compile, is there an easier way than this one? : public string p1 { get; set; } public string p2 { get;…
antonicelli
  • 333
  • 1
  • 4
  • 11
-1
votes
1 answer

Synchronize two pojos with like-named fields together

I have two pojos. public class Pojo1 implements Serializable { private static final long serialVersionUID = 1302290920579795856L; private Long id; private String idNumber; private String vendorNumber; private Date expires; …
Nicholas DiPiazza
  • 10,029
  • 11
  • 83
  • 152
1 2 3
14
15