gpt4 book ai didi

c# - 类型或命名空间名称不存在

转载 作者:行者123 更新时间:2023-11-30 23:12:12 24 4
gpt4 key购买 nike

我正在使用下面的代码:

using CMS.DataEngine;
using CMS.DocumentEngine;

namespace Fort.CMS.CMSPages
{
public partial class CreatePage : System.Web.UI.Page
{
#region "Variables"

private CMS.DocumentEngine.TreeNode mNode;
private TreeProvider mTree;

在线获取错误:private CMS.DocumentEngine.TreeNode mNode;

Error :

Type or namespace name "DocumentEngine" does not exist in the namespace "Fort.CMS"

此处无法识别 DocumentEngine。

但如果我们删除命名空间,它会起作用。

namespace Fort.CMS.CMSPages
{}

最佳答案

我认为存在命名空间冲突。请按如下方式使用

using CMS.DataEngine;
using DE=CMS.DocumentEngine;

namespace Fort.CMS.CMSPages
{
public partial class CreatePage : System.Web.UI.Page
{
#region "Variables"

private DE.TreeNode mNode;
private TreeProvider mTree;

关于c# - 类型或命名空间名称不存在,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/44282995/

24 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com