Posted on 26th April 2024
Type Switch is a build that allows different type assertions in sequence. Type switch is identical to the normal switch statement, but type switch specifies types.
Syntax:
Switch b:= c. (type)
{
Case A; // here b has type A
Case C; // here b has type C
default;
}
STILL GOT QUERIES?