Skip to content

Commit 4d58df6

Browse files
fdijPatrickRUG
andauthored
Update src/ProgressOnderwijsUtils/Pocos/PocoProperties.cs
Co-authored-by: Patrick Visser <[email protected]>
1 parent 9c682a6 commit 4d58df6

File tree

1 file changed

+4
-7
lines changed

1 file changed

+4
-7
lines changed

src/ProgressOnderwijsUtils/Pocos/PocoProperties.cs

Lines changed: 4 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -37,13 +37,10 @@ public Type PocoType
3737

3838
public bool TryGetByName(string name, [NotNullWhen(true)] out IPocoProperty<T>? property)
3939
{
40-
if (IndexByName.TryGetValue(name, out var index)) {
41-
property = Properties[index];
42-
return true;
43-
} else {
44-
property = null;
45-
return false;
46-
}
40+
property = IndexByName.TryGetValue(name, out var index)
41+
? Properties[index]
42+
: null;
43+
return property != null;
4744
}
4845

4946
public IPocoProperty<T> GetByName(string name)

0 commit comments

Comments
 (0)