GetGeneration Method
Collapse the table of content
Expand the table of content

GC.GetGeneration Method

This member can be used only by trusted applications. If you try to use this member in a partial-trust application, your code will throw a MethodAccessException exception. This member is security-critical, which restricts its use.

Retrieves the generation of a specified object.

Namespace:  System
Assembly:  mscorlib (in mscorlib.dll)

public static int GetGeneration(
	Object obj


Type: System.Object
The object to check.

Return Value

Type: System.Int32
The generation number of the specified object.

Silverlight for Windows Phone

Supported in: Windows Phone OS 7.1

For a list of the operating systems and browsers that are supported by Silverlight, see Supported Operating Systems and Browsers.

Community Additions

© 2016 Microsoft