Replies: 3 comments
-
This is an issue for dotnet/runtime repository |
Beta Was this translation helpful? Give feedback.
0 replies
-
Are you familiar with Extension Methods? You might consider making an extension method that allows you to do that. |
Beta Was this translation helpful? Give feedback.
0 replies
-
... are you sure you don't want |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
While adding new items in collections like in list we check if that item is present in list or not and then add
ex : assuming listOfEmployee is List with some values in it
Instead of writing additional 'if' statement ,
we could add a new parameter in Add method that will tell to check for existence of items in collection.
Additional parameter could be enum with list of options.
And the code to add item in collection could be something like this :
sorry for terrible option name :-)
Beta Was this translation helpful? Give feedback.
All reactions