类型安全是有关类型操作的一种规范:类型转换必须要显示转换,不能只用等于号“=”隐式转换
int num = 0; string str = "3"; num = str;❌ Num = int.Parse(str);✔️