From 43e69a99445acc51b472afa78492316bc554c4f8 Mon Sep 17 00:00:00 2001 From: Benjamin Michaelis Date: Wed, 3 Apr 2024 19:38:04 -0700 Subject: [PATCH] fix: Comment in 18.21 (#771) Fixes #712 --- Errata.md | 3 ++- ....21.LimitingAnAttributesUsageWithAttributeUsageAttribute.cs | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/Errata.md b/Errata.md index 1ac5ef244..533ece348 100644 --- a/Errata.md +++ b/Errata.md @@ -34,4 +34,5 @@ Zhou Jing | 18 | 911 | Change CommandLineRequiredAttribute to CommandLineSwitchR Zhou Jing | 18 | 902-903 | Change CommandLineAliasAttribute to CommandLineSwitchAliasAttribute Zhou Jing | 23 | 1105 | Change `Length = 10` in listing 23.20 to `Length = 12` to show entire output message Zhou Jing | 18 | 926-927 | Change 'LastName' references to be 'FirstName' in paragraphs -Jinhang He | 5 | 255 | Edit listing 5.20 to used `image[index]` for the second print statement \ No newline at end of file +Jinhang He | 5 | 255 | Edit listing 5.20 to used `image[index]` for the second print statement +Zhou Jing | 18 | 908 | Change comment in Listing 18.21 to "Restrict the attribute to properties and fields" from "Restrict the attribute to properties and methods" \ No newline at end of file diff --git a/src/Chapter18/Listing18.21.LimitingAnAttributesUsageWithAttributeUsageAttribute.cs b/src/Chapter18/Listing18.21.LimitingAnAttributesUsageWithAttributeUsageAttribute.cs index e050de1f8..6351524b7 100644 --- a/src/Chapter18/Listing18.21.LimitingAnAttributesUsageWithAttributeUsageAttribute.cs +++ b/src/Chapter18/Listing18.21.LimitingAnAttributesUsageWithAttributeUsageAttribute.cs @@ -1,7 +1,7 @@ namespace AddisonWesley.Michaelis.EssentialCSharp.Chapter18.Listing18_21; #region INCLUDE -// Restrict the attribute to properties and methods +// Restrict the attribute to properties and fields #region HIGHLIGHT [AttributeUsage( AttributeTargets.Field | AttributeTargets.Property)]