GC.GetGeneration : GC « System « VB.Net by API






GC.GetGeneration

  

Imports System
Imports System.Text
Imports System.Text.RegularExpressions


Public Class MainClass
    Shared Sub Main(  )
    Dim myObject As Object = New Object()
    Dim i As Integer

    For i = 0 To 3
      Console.WriteLine(String.Format("Generation = {0}", _
                        GC.GetGeneration(myObject)))
      GC.Collect()
      GC.WaitForPendingFinalizers()
    Next i

    End Sub 'Main

   
End Class

   
    
  








Related examples in the same category

1.GC.Collect()
2.GC.GetTotalMemory
3.GC.SuppressFinalize
4.GC.WaitForPendingFinalizers()