© 2026 Hedgehog Software, LLC
Twitter
GitHub
Discord
System
Light
Dark
More
Communities
Docs
About
Terms
Privacy
Search
Star
Feedback
Setup for Free
C
C#
•
2y ago
•
29 replies
UnemployedNinja
Check if an object is a Dictionary of any type
I
'm trying to type
-check a method parameter using
if (dict.GetType() == typeof(Dictionary))
if (dict.GetType() == typeof(Dictionary))
.
How can I check for all types of
Dictionary
Dictionary
without having to write them all out
.
Or am I wasting my time here
, since the language has type
-checking anyway
?
C#
Join
We are a programming server aimed at coders discussing everything related to C# (CSharp) and .NET.
61,871
Members
View on Discord
Resources
ModelContextProtocol
ModelContextProtocol
MCP Server
Recent Announcements
Similar Threads
Was this page helpful?
Yes
No
Similar Threads
Double check if an object is one of provided types
C
C# / help
4y ago
❔ Check if Type is static
C
C# / help
3y ago
❔ Type is Typeof Dictionary
C
C# / help
3y ago