CodeTypeDeclaration has BaseTypes property you need to use that to add all the base types.
-----Original Message----- From: Paresh [mailto:[EMAIL PROTECTED]] Sent: Friday, May 10, 2002 10:57 AM To: [EMAIL PROTECTED] Subject: [DOTNET] CodeDom: How to generate inheritance code? My goal is to generate something like class Employee : Person, ICustomInterface { ... } So far I get the class from CSharpCodeProvider CodeProvider = new CSharpCodeProvider(); ICodeGenerator Generator = CodeProvider.CreateGenerator(); CodeNameSpace Namespace = new CodeNamespace("TestNameSpace"); CodeTypeDeclaration TypeDeclaration = new CodeTypeDeclaration("Employee"); TypeDeclaration.IsClass = true; Namespace.Types.Add(TypeDeclaration); ... Generator.GenerateCodeFromNamespace(Namespace, TextWriter, Options); How do I get the base class (Person) and implemented interface (ICustomInterface) generated? Thanks in advance. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com. You can read messages from the DOTNET archive, unsubscribe from DOTNET, or subscribe to other DevelopMentor lists at http://discuss.develop.com.