Creates a Windows feature selection and adds it to the collection if it does not already exist. Otherwise, it returns the existing one. Namespace: Microsoft.ComponentStudio.ComponentPlatformInterface
Assembly: Microsoft.ComponentStudio.ComponentPlatformInterface (in microsoft.componentstudio.componentplatforminterface.dll)

Usage

Visual Basic
Dim name As String
Dim createOption As CreateOptions
Dim returnValue As AnswerFileWindowsFeatureSelection
Dim answerFileWindowsFeatureSelectionCollection1 As AnswerFileWindowsFeatureSelectionCollection
returnValue = answerFileWindowsFeatureSelectionCollection1.Create(name, createOption)

Syntax

Visual Basic
Public Function Create( _
		ByVal name As String, _
		ByVal createOption As CreateOptions _
) As AnswerFileWindowsFeatureSelection
C#
public AnswerFileWindowsFeatureSelection Create(
		string name, 
		CreateOptions createOption
);
C++
public:
AnswerFileWindowsFeatureSelection^ Create(
		String^ name,
		CreateOptions createOption
);
J#
public AnswerFileWindowsFeatureSelection Create(
		System.String name, 
		CreateOptions createOption
);
JScript
public function Create(
		 name : String, 
		 createOption : CreateOptions
) : AnswerFileWindowsFeatureSelection;

Parameters

name

Name of the Windows feature selection

createOption

Enumeration element that determines whether to return the existing entity or to throw an exception when an entity already exists.

Return Value

An instance of AnswerFileWindowsFeatureSelection.

Remarks

ArgumentNullException is thrown if name is null or empty.

InvalidOperationException is thrown if there is already an AnswerFileWindowsFeatureSelection for name and createOption equals FailIfExists.


Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

Platforms

Development Platforms

Windows XP Home Edition, Windows XP Professional, Windows Server 2003, Windows Vista, and Windows 2000

Target Platforms

See Also