判断指定的对象实例是不是同一个实例

来源:互联网 发布:数据采集与处理杂志 编辑:程序博客网 时间:2024/06/06 16:33

Object.ReferenceEquals

// Summary:
        //     Determines whether the specified object instances are the same instance.
        //
        // Parameters:
        //   objA:
        //     The first object to compare.
        //
        //   objB:
        //     The second object to compare.
        //
        // Returns:
        //     true if objA is the same instance as objB or if both are null; otherwise,
        //     false.

原创粉丝点击