DetailGroup.Add Method (String, String)
Initializes a DetailItem object with the specified display name and the specified display value, and then adds the object to the DetailGroup.
Namespace: Microsoft.WindowsServerSolutions.Administration.ObjectModel
Assembly: Microsoft.WindowsServerSolutions.Administration.ObjectModel (in Microsoft.WindowsServerSolutions.Administration.ObjectModel.dll)
Syntax
public DetailItem Add(
string displayName,
string displayValue
)
public:
DetailItem^ Add(
String^ displayName,
String^ displayValue
)
Public Function Add (
displayName As String,
displayValue As String
) As DetailItem
Parameters
displayName
Type: System.StringThe name that is displayed for the DetailItem object.
displayValue
Type: System.StringThe value that is displayed for the DetailItem object.
Return Value
Type: Microsoft.WindowsServerSolutions.Administration.ObjectModel.DetailItem
An instance of DetailItem.
Exceptions
Exception | Condition |
---|---|
ArgumentException | One or more of the parameters are not valid. |
ArgumentNullException | One or more of the parameters are null. |
Examples
The following code example shows how to initialize a DetailGroup object that initializes a DetailItem with the specified display name and display value:
DetailItem item = null;
DetailGroup group = new DetailGroup("Computer Information");
item = group.Add(“Computer Details”, “Server1”);
See Also
Add Overload
DetailGroup Class
Microsoft.WindowsServerSolutions.Administration.ObjectModel Namespace
Return to top