ObjectInfo Class

Renders the property names and values of the specified object and of any subobjects that it references.

Inheritance Hierarchy


Namespace:  System.Web.Helpers
Assembly:  System.Web.Helpers (in System.Web.Helpers.dll)


Public NotInheritable Class ObjectInfo
public static class ObjectInfo
public ref class ObjectInfo abstract sealed
type ObjectInfo =  class end
public final class ObjectInfo

The ObjectInfo type exposes the following members.


  Name Description
Public methodStatic member Print Renders the property names and values of the specified object and of any subobjects.



This class represents a helper, which is a component that simplifies web programming in ASP.NET Web Pages. You can use the ObjectInfo class to help analyze and debug ASP.NET Web Pages code by rendering the value of an object to the web page. For a simple object such as a string variable, the class displays the type of the object and its value. For an object that contains multiple items, such as an array with multiple elements or a data object that contains multiple rows, the class displays each element or property and its value.

To display an object's property names and property values, call the Print(Object, Int32, Int32) method and pass the object to it. The method renders each property name and property value on a separate line.

Security noteSecurity Note

Remove all calls to the Print(Object, Int32, Int32) method from production code. Otherwise, information about the objects in the code will be displayed to site visitors, which might be a security risk.

Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.

See Also


System.Web.Helpers Namespace


Other Resources

Introduction to Debugging with ASP.NET Razor Pages