© 2026 Hedgehog Software, LLC

TwitterGitHubDiscord
More
CommunitiesDocsAboutTermsPrivacy
Search
Star
Setup for Free
C#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# 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

✅ Get instance name inside of class
C#CC# / help
4y ago
✅ Class instance reference
C#CC# / help
11mo ago
❔ class instance creation
C#CC# / help
4y ago
accessing an instance of a class in another class
C#CC# / help
3y ago