C#里面如何判断一个Object是否是某种类型
时间:2021-05-24 16:23:05
收藏:0
阅读:0
var isA = oldObject.GetType() == typeof(Dictionary<string, string>)
var isB = oldObject.GetType().FullName.IndexOf("Dictionary") > 0;
var isC = oldObject is Dictionary<string, string>;
评论(0)