© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#C
C#•4y ago•
6 replies
androidui

explicit null param

is there a way to specify an explicit overload for
null
null
?

eg

foo(object_a); // object overload
foo(null); // null overload



eg, equivilant to C++'s
std::nullptr_t
std::nullptr_t


specifically to avoid

foo(C_A);
foo(C_B);
foo(null); // ambigous overload
foo(C_A);
foo(C_B);
foo(null); // ambigous overload
C# banner
C#Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871Members
Resources
Recent Announcements

Similar Threads

Was this page helpful?

Similar Threads

MapPost: Parameters are null
C#CC# / help
3y ago
✅ Explicit interface implementation
C#CC# / help
17mo ago
✅ ObjectDisposedException without explicit trace
C#CC# / help
2y ago
Struct with explicit layout
C#CC# / help
3y ago