This documentation is archived and is not being maintained.

Container.CreateSite Method

Creates a site ISite for the given IComponent and assigns the given name to the site.

[Visual Basic]
Protected Overridable Function CreateSite( _
   ByVal component As IComponent, _
   ByVal name As String _
) As ISite
protected virtual ISite CreateSite(
 IComponent component,
 string name
protected: virtual ISite* CreateSite(
 IComponent* component,
 String* name
protected function CreateSite(
   component : IComponent,
 name : String
) : ISite;


The IComponent to create a site for.
The name to assign to component; or a null reference (Nothing in Visual Basic) to skip the name assignment.

Return Value

The newly created site.


If name is a null reference (Nothing in Visual Basic) the IComponent is added to the Container without an identifying name.

This method can be overridden by a derived class. Implementors wishing to override CreateSite can provide a custom implementation through a class implementing ISite.


Platforms: Windows 98, Windows NT 4.0, Windows Millennium Edition, Windows 2000, Windows XP Home Edition, Windows XP Professional, Windows Server 2003 family, .NET Compact Framework

See Also

Container Class | Container Members | System.ComponentModel Namespace