Share via


Set.In(Object) Method

Definition

Determines whether a specified element is a member of the set.

public:
 bool In(System::Object ^ element);
public bool In (object element);
member this.In : obj -> bool
Public Function In (element As Object) As Boolean

Parameters

element
Object

Returns

true if the specified element is found in the set; otherwise, false.

Remarks

The following example loads the contents a particular change list in the version control system, if the in method returns false. The changeSet set contains a list of the change list numbers that already have the content loaded.

public void pageActivated() 
{ 
    SysVersionControlTmpItem contentsAddition; 
    if (!changeSet.in(changes.ChangeNumber)) 
    { 
        startLengthyOperation(); 
        contentsAddition = versioncontrol.getChangeNumberContents( 
            changes.ChangeNumber); 
        while select contentsAddition 
        { 
            contentsItem.data(contentsAddition); 
            contentsItem.insert(); 
        } 
        contents_ds.executeQuery(); 
        changeSet.add(changes.ChangeNumber); 
    } 
    super(); 
}

Applies to