© 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
•
12 replies
UnemployedNinja
Check value type of extended class instance
I have
BaseClass
BaseClass
and
MyClass : BaseClass
MyClass : BaseClass
.
Using
val is BaseClass
val is BaseClass
will return true for any object that
is
, or extends
BaseClass
BaseClass
.
How can I check if the object is of type
MyClass
MyClass
, and not
BaseClass
BaseClass
?
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
✅ Get instance name inside of class
C
C# / help
4y ago
✅ Class instance reference
C
C# / help
11mo ago
❔ class instance creation
C
C# / help
4y ago
accessing an instance of a class in another class
C
C# / help
3y ago