I previously worked on a C# project but now I'm working with Visual Basic and what I want to do is simply translate the C# code to Visual Basic and it's going fine except for one piece of code of C# that I have no idea how to translate to VB
The C# code is:
private void ReadInput(Animal animal)
{
// Mammal is a class that inherits from the Animal class
Mammal mammal = animal as Mammal; //<<----How to translate this code?
if (mammal != null)
{
mammal.Teeth = ReadTeeth();
}
}
I'm not really sure how to translate animal as Mammal
to Visual Basic.