コード例 #1
0
        public ClassDeclaration AddClass(string name, MemberAttributes attributes)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            if (this.Classes.Contains(name))
            {
                throw new ArgumentException("class already existing in namespace");
            }

            ClassDeclaration c = new ClassDeclaration(name, this);

            c.Attributes = attributes;
            this.Classes.Add(c);
            return(c);
        }