

- Trending Categories
Data Structure
Networking
RDBMS
Operating System
Java
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
What is the C# equivalent to Java's isInstance()?
The java.lang.Class.isInstance() determines if the specified Object is assignment-compatible with the object represented by this Class
Java’s isInstance() method’s equivalent in C# is IsAssignableFrom().
Another simplest way for isInstance() equivalent is −
bool res = (ob is DemoClass);
You can also work with Type.IsInstanceOfType for the same result −
ob.GetType().IsInstanceOfType(otherOb)
- Related Questions & Answers
- What is the Java equivalent to MySQL's smallint?
- What's the Kotlin equivalent of Java's String[]?
- What is the PHP equivalent of MySQL's UNHEX()?
- C# equivalent to Java's Thread.setDaemon?
- What is the equivalent of C# namespace in Java?
- Kotlin equivalent of Java's equalsIgnoreCase
- What is the C# equivalent for the Java System.exit(0)?
- C# Equivalent to Java's Double Brace Initialization?
- What is the Certainty Equivalent Method?
- What is the equivalent of Java static methods in Kotlin?
- What is the Linux Equivalent to DOS Pause?
- What is Python equivalent of the ! operator?
- What is the MySQL SELECT INTO Equivalent?
- What is the C++ equivalent of sprintf?
- What is the equivalent of Java static final fields in Kotlin?
Advertisements