Skip to content

Commit 69da238

Browse files
prefer shortened linq update (#2093)
1 parent 01735c8 commit 69da238

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

docs/guides/int_basics/modals/intro.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -111,9 +111,9 @@ _client.ModalSubmitted += async modal =>
111111
List<SocketMessageComponentData> components =
112112
modal.Data.Components.ToList();
113113
string food = components
114-
.Where(x => x.CustomId == "food_name").First().Value;
114+
.First(x => x.CustomId == "food_name").Value;
115115
string reason = components
116-
.Where(x => x.CustomId == "food_reason").First().Value;
116+
.First(x => x.CustomId == "food_reason").Value;
117117

118118
// Build the message to send.
119119
string message = "hey @everyone; I just learned " +

0 commit comments

Comments
 (0)