Swift 3.0 (also works with structs)
if type(of: someInstance) == type(of: anotherInstance) {
print("matching type")
} else {
print("something else")
}
Swift 3.0 (also works with structs)
if type(of: someInstance) == type(of: anotherInstance) {
print("matching type")
} else {
print("something else")
}