C#造实例,对象, 密封类

如下图所示,
var current = ProjectTree.SelectedItem.Tag, debug模式下可以看到 current 的value 是 {Siemens.Engineering.SW.Blocks.PlcBlockSystemGroup}, current的type 是 object {Siemens.Engineering.SW.Blocks.PlcBlockSystemGroup}

现在的问题是,这里的value 和 type指的什么意思。 用花括号代表着什么? 如果我想新造一个Siemens.Engineering.SW.Blocks.PlcBlockSystemGroup 的对象或者叫实例? 应该怎么弄?这个类长这样。 我这样写是报错的 PlcSystemBlockGroup current = new PlcSystemBlockGroup();

 
using System;
using System.Collections.Generic;
using System.Diagnostics;
using System.Security;
 
namespace Siemens.Engineering.SW.Blocks
{
    //
    // Summary:
    //     Group containing Plc system blocks & Plc system block groups
    [DebuggerNonUserCode]
    [SecuritySafeCritical]
    public sealed class PlcSystemBlockGroup : IEngineeringObject, IEngineeringCompositionOrObject, IEngineeringInstance, IInternalObjectAccess, IInternalInstanceAccess, IInternalBaseAccess, IEquatable<object>
    {
        //
        // Summary:
        //     Composition of Plc system blocks
        public PlcBlockComposition Blocks { get; }
        //
        // Summary:
        //     Composition of Plc system block groups
        public PlcSystemBlockGroupComposition Groups { get; }
        //
        // Summary:
        //     EOM parent of this object
        public IEngineeringObject Parent { get; }
        //
        // Summary:
        //     The name of the Plc system block group
        public string Name { get; }
 
        //
        // Summary:
        //     Determines whether the specified System.Object is equal to this instance.
        //
        // Parameters:
        //   obj:
        //     The System.Object to compare with this instance.
        //
        // Returns:
        //     true if the specified System.Object is equal to this instance; otherwise, false.
        [SecuritySafeCritical]
        public override bool Equals(object obj);
        //
        // Summary:
        //     Gets a list of attributes for the given names.
        //
        // Parameters:
        //   names:
        //     The names of the attributes to get.
        //
        // Returns:
        //     A list of the attributes for the given names with nulls for names not found.
        [SecuritySafeCritical]
        public IList<object> GetAttributes(IEnumerable<string> names);
        //
        // Summary:
        //     Returns a hash code for this instance.
        //
        // Returns:
        //     A hash code for this instance, suitable for use in hashing algorithms and data
        //     structures like a hash table.
        [SecuritySafeCritical]
        public override int GetHashCode();
        //
        // Summary:
        //     Sets a list of values for the given attributes.
        //
        // Parameters:
        //   attributes:
        //     The attributes value list.
        [SecuritySafeCritical]
        public void SetAttributes(IEnumerable<KeyValuePair<string, object>> attributes);
        //
        // Summary:
        //     Returns a System.String that represents the current System.Object.
        //
        // Returns:
        //     A System.String that represents the current System.Object.
        [SecuritySafeCritical]
        public override string ToString();
    }
}
 


可以采用父节点的create方法创建节点。再执行导入挂到响应地节点下。有帮助望采纳,谢谢!

        PlcBlockGroup get_relate_group(PlcBlockGroup group, string str_root, string strfile)
        {
            string relate_path = get_relate_path(str_root, strfile);
            string[]dirs = relate_path.Split('\\');
            PlcBlockGroup temp = group;
            for (int i=0;i<dirs.Length-1;i++)
            {
                if(i == 0)
                {
                    if (group.Groups.Find(dirs[i]) == null)
                    {
                        group.Groups.Create(dirs[i]);
                    }
                    temp = group.Groups.Find(dirs[i]);
                }
                else
                {
                    if(temp.Groups.Find(dirs[i]) == null)
                    {
                        temp.Groups.Create(dirs[i]);
                        temp = temp.Groups.Find(dirs[i]);
                    }
                }
            }