Surface GetBaseSurface()

book_4_sparkGenerated
code_blocksInput

Description

Returns the base surface of this Surface instance, or null if this is the default surface. This method is useful for retrieving the underlying surface properties when a surface is derived from another.

Usage

Call this method on an instance of Surface to get its base surface. If the surface is the default one, the method will return null.

Example

// Example of using GetBaseSurface
Surface mySurface = new Surface();
Surface baseSurface = mySurface.GetBaseSurface();

if (baseSurface != null)
{
    // Do something with the base surface
    Console.WriteLine("Base surface found.");
}
else
{
    // Handle the case where there is no base surface
    Console.WriteLine("This is the default surface.");
}