Skip to content

Commit 57c9a3c

Browse files
change examples L22
Vorschlag: semantische Präzisierung im Beispiel zur Preisänderung
2 parents a8b1950 + 12e1909 commit 57c9a3c

1 file changed

Lines changed: 14 additions & 14 deletions

File tree

22_Events.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -337,10 +337,10 @@ public class Stock{
337337
public decimal Price{
338338
get { return price; }
339339
set { if (price != value){
340-
if (OnPropertyPriceChanged != null){
341-
OnPropertyPriceChanged();
342-
price = value;
343-
}
340+
price = value;
341+
if (OnPropertyPriceChanged != null){
342+
OnPropertyPriceChanged();
343+
}
344344
}
345345
}
346346
}
@@ -431,10 +431,10 @@ public class Stock{
431431
public decimal Price{
432432
get { return price; }
433433
set { if (price != value){
434-
if (OnPropertyPriceChanged != null){
435-
OnPropertyPriceChanged(this, EventArgs.Empty );
436-
price = value;
437-
}
434+
price = value;
435+
if (OnPropertyPriceChanged != null){
436+
OnPropertyPriceChanged(this, EventArgs.Empty);
437+
}
438438
}
439439
}
440440
}
@@ -503,12 +503,12 @@ public class Stock{
503503
public decimal Price{
504504
get { return price; }
505505
set { if (price != value){
506-
if (OnPropertyPriceChanged != null){
507-
PriceChangedEventArgs myEventArgs = new PriceChangedEventArgs();
508-
myEventArgs.Difference = price - value;
509-
OnPropertyPriceChanged(this, myEventArgs );
510-
price = value;
511-
}
506+
if (OnPropertyPriceChanged != null){
507+
PriceChangedEventArgs myEventArgs = new PriceChangedEventArgs();
508+
myEventArgs.Difference = price - value;
509+
OnPropertyPriceChanged(this, myEventArgs);
510+
}
511+
price = value;
512512
}
513513
}
514514
}

0 commit comments

Comments
 (0)