You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most collections have an read-only interface. Use that if the method doesn't write to the collection. This shows the caller that the collection stays unchanged and opens up the opportunity for them to use the read-only interface internally.
publicintGetIndexOf(IReadOnlyList<int>list)
The text was updated successfully, but these errors were encountered:
ynsehoornenborg
changed the title
Method parameters that are not written too can be readonly
Method parameters that are not written to, can be made readonly
Jan 27, 2023
Most collections have an read-only interface. Use that if the method doesn't write to the collection. This shows the caller that the collection stays unchanged and opens up the opportunity for them to use the read-only interface internally.
The text was updated successfully, but these errors were encountered: