IContentTypeRegistryService::AddContentType Method (String^, IEnumerable<String^>^)
Creates and adds a new content type.
Assembly: Microsoft.VisualStudio.CoreUtility (in Microsoft.VisualStudio.CoreUtility.dll)
Parameters
- typeName
-
Type:
System::String^
The name of the content type.
- baseTypeNames
-
Type:
System.Collections.Generic::IEnumerable<String^>^
The list of content type names to be used as base content types. Optional.
| Exception | Condition |
|---|---|
| InvalidOperationException | typeName or one of the baseTypeNames is the name of UnknownContentType, or the content type already exists, or one of the base types would introduce a cyclic base type relationship. |
| ArgumentException | typeName is null or empty. |
Show: