Compartilhar via


DetailGroup.Add Method (String)

 

Initializes a DetailItem object with the specified display text and adds the item to the DetailGroup.

Namespace:   Microsoft.WindowsServerSolutions.Administration.ObjectModel
Assembly:  Microsoft.WindowsServerSolutions.Administration.ObjectModel (in Microsoft.WindowsServerSolutions.Administration.ObjectModel.dll)

Syntax

public DetailItem Add(
    string displayText
)
public:
DetailItem^ Add(
    String^ displayText
)
Public Function Add (
    displayText As String
) As DetailItem

Parameters

Return Value

Type: Microsoft.WindowsServerSolutions.Administration.ObjectModel.DetailItem

An instance of DetailItem.

Exceptions

Exception Condition
ArgumentException

displayText is not valid.

ArgumentNullException

displayText is null.

Examples

The following code example shows how to initialize a DetailGroup object that initializes a DetailItem with the specified display text:

DetailItem item = null;
DetailGroup group = new DetailGroup("Computer Information");
item = group.Add(“Computer Details”);

See Also

Add Overload
DetailGroup Class
Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace

Return to top