📌  相关文章
📜  c# 检查对象是否可以转换为类型 - C# 代码示例

📅  最后修改于: 2022-03-11 14:48:43.681000             🧑  作者: Mango

代码示例1
var myObject = something as String;

if (myObject != null)
{
  // successfully cast
}
else
{
  // cast failed
}