internal 访问仅限于当前程序集。internal 关键字是类型和类型成员的访问修饰符。只有在同一程序集的文件中,内部类型或成员才是可访问的,

解决方案 »

  1.   

    需要是protected internal
    没测试,楼主自己试一下
    internal肯定是不行的
      

  2.   

    这个是SharePoint里的一个类,我就是要继承他,目的是要实现按部门设置权限.
    [SharePointPermission(SecurityAction.LinkDemand, ObjectModel=true), SharePointPermission(SecurityAction.InheritanceDemand, ObjectModel=true)]
    public abstract class SPPrincipal : SPMember
    {
        // Fields
        protected object[,] m_arrMembersData;
        protected bool m_bDataInitialized;
        protected uint m_index;
        internal ISecurableObject m_SecurableObject;
        protected SPWeb m_web;    // Methods
        internal SPPrincipal(SPWeb web, ISecurableObject scope, object[,] arrMembersData, uint index)
        {
            if (web == null)
            {
                throw new ArgumentException();
            }
            this.m_web = web;
            this.m_SecurableObject = scope;
            this.m_index = index;
            this.m_arrMembersData = arrMembersData;
            this.m_bDataInitialized = arrMembersData != null;
        }    protected object GetField(uint fieldIndex)
        {
            if (!this.m_bDataInitialized)
            {
                this.InitMember();
            }
            if (this.m_arrMembersData == null)
            {
                throw new ArgumentException();
            }
            return this.m_arrMembersData[fieldIndex, this.m_index];
        }    protected abstract void InitMember();
        protected void SetField(uint fieldIndex, object value)
        {
            if (!this.m_bDataInitialized)
            {
                this.InitMember();
            }
            if (this.m_arrMembersData == null)
            {
                throw new ArgumentException();
            }
            this.m_arrMembersData[fieldIndex, this.m_index] = value;
        }    // Properties
        public abstract string Name { get; set; }    public SPWeb ParentWeb
        {
            get
            {
                return this.m_web;
            }
        }    private SPRoleDefinitionBindingCollection RoleBindings
        {
            get
            {
                try
                {
                    return this.m_web.RoleAssignments.GetAssignmentByPrincipal(this).RoleDefinitionBindings;
                }
                catch (ArgumentException)
                {
                    return new SPRoleDefinitionBindingCollection();
                }
            }
        }    [Obsolete("Use the SPRoleAssignment class instead")]
        public SPRoleCollection Roles
        {
            get
            {
                return new SPRoleCollection(this.m_web, this.RoleBindings);
            }
        }
    }
      

  3.   

    子类继承父类,首先要确保父类可以被创造,不管父类有没有internal 构造函数,只要他能在程序集外被创造,它就可以继承类似
    namespace one
    {
     public abstract class baseclass
    {
    internal baseclass( )
    {
    }
    public baseclass( int a )
    {}
    }
    }
    namespace two
    {
      public class childclass:One.baseclass
    {
    public childclass( int a):base(a)
    {}
    }
    }