Chat Support
Loupe - Log - Monitor - Resolve
Gibraltar Namespace / StringReference.WeakStringCollection Class / PackAndOrAdd Method
A new string to add, or null if only a pack is desired. If the string already exists in this collection, the one from the collection will be stored in the reference.

In This Topic
    PackAndOrAdd Method
    In This Topic
    Add an optional new string to this collection and perform a pack on this collection while doing so.
    Syntax
    'Declaration
     
    
    Public Function PackAndOrAdd( _
       ByRef newString As String _
    ) As Integer
    public int PackAndOrAdd( 
       ref string newString
    )

    Parameters

    newString
    A new string to add, or null if only a pack is desired. If the string already exists in this collection, the one from the collection will be stored in the reference.

    Return Value

    The total number of string references remaining after the pack.
    Requirements

    Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2

    See Also