https://github.com/omid-ahmadpour/avoidnullcollectionsincsharp
This repository demonstrates best practices for handling collections in C#.
https://github.com/omid-ahmadpour/avoidnullcollectionsincsharp
Last synced: 7 months ago
JSON representation
This repository demonstrates best practices for handling collections in C#.
- Host: GitHub
- URL: https://github.com/omid-ahmadpour/avoidnullcollectionsincsharp
- Owner: omid-ahmadpour
- License: apache-2.0
- Created: 2024-09-15T10:39:14.000Z (about 1 year ago)
- Default Branch: master
- Last Pushed: 2024-09-15T10:40:43.000Z (about 1 year ago)
- Last Synced: 2025-01-07T16:13:23.364Z (9 months ago)
- Language: C#
- Homepage:
- Size: 11.7 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# Avoiding Null Collections in C#
This repository demonstrates best practices for handling collections in C#.
It explains why you should never return null collections, how it leads to runtime errors, and provides alternatives.
The repo includes code examples for both problematic null cases and their safer solutions, helping you write cleaner and more reliable code.