Forces a collection of generations from 0 through a specified generation.
[Visual Basic] Overloads Public Shared Sub Collect( _ ByVal generation As Integer _ ) [C#] public static void Collect( int generation ); [C++] public: static void Collect( int generation ); [JScript] public static function Collect( generation : int );
Exception Type | Condition |
---|---|
ArgumentException | is thrown if generation is less than 0 or greater than GetMaxGeneration(). |
GC Class | GC Members | System Namespace | GC.Collect Overload List