# CommonObject class

Namespace: [Rhino.Runtime](https://developer.rhino3d.com/api/rhinocommon/namespace/rhino.runtime.md) · Assembly: [RhinoCommon](https://developer.rhino3d.com/api/rhinocommon/assembly/rhinocommon.md)

```cs
[Serializable]
public abstract class CommonObject : IDisposable, ISerializable
```

Base class for .NET classes that wrap C++ unmanaged Rhino classes.

**Derived types:** [BrepRegion](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepregion.md), [BrepRegionFaceSide](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.brepregionfaceside.md), [CachedTextureCoordinates](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.cachedtexturecoordinates.md), [Environment](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.environment.md), [GeometryBase](https://developer.rhino3d.com/api/rhinocommon/type/rhino.geometry.geometrybase.md), [ModelComponent](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.modelcomponent.md), [ObjectAttributes](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.objectattributes.md), [RenderSettings](https://developer.rhino3d.com/api/rhinocommon/type/rhino.render.rendersettings.md), [Texture](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.texture.md), [ViewportInfo](https://developer.rhino3d.com/api/rhinocommon/type/rhino.docobjects.viewportinfo.md)

## Constructors

- [CommonObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/ctor.md): (2 overloads) Allows construction from inheriting classes.

## Finalizer

- [~CommonObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/finalize.md): Passively reclaims unmanaged resources when the class user did not explicitly call Dispose().

## Properties

- [Disposed](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/disposed.md): Indicates if this object has been disposed or the document it originally belonged to has been disposed.
- [HasUserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/hasuserdata.md): Gets true if this class has any custom information attached to it through UserData.
- [IsDocumentControlled](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isdocumentcontrolled.md): If true this object may not be modified. Any properties or functions that attempt to modify this object when it is set to "IsReadOnly" will throw a NotSupportedException.
- [IsValid](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isvalid.md): Tests an object to see if it is valid.
- [PerformCorruptionTesting](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/performcorruptiontesting.md): (static) Used to test ON_Object* pointers to see if they are a brep or mesh that is corrupt enough to crash Rhino.
- [UserData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/userdata.md): List of custom information that is attached to this class.
- [UserDictionary](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/userdictionary.md): Dictionary of custom information attached to this class. The dictionary is actually user data provided as an easy to use shareable set of information.

## Methods

- [ComputeMemoryEstimate](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/computememoryestimate.md): (static) Computes an estimate of the number of bytes that this object is using in memory.
- [ConstructConstObject](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/constructconstobject.md): Assigns a parent object and a sub-object index to this.
- [Dispose](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/dispose.md): (2 overloads) Actively reclaims unmanaged resources that this instance uses.
- [EnsurePrivateCopy](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/ensureprivatecopy.md): If you want to keep a copy of this class around by holding onto it in a variable after a command completes, call EnsurePrivateCopy to make sure that this class is not tied to the document. You can call this function as many times as you want.
- [FromBase64String](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/frombase64string.md): (static) Create a CommonObject instance from a Base64 encoded string. This is typically the values used when passing common objects around as JSON data
- [FromJSON](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/fromjson.md): (2 overloads, static) Create a CommonObject instance from a JSON dictionary
- [GetObjectData](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/getobjectdata.md): Populates a System.Runtime.Serialization.SerializationInfo with the data needed to serialize the target object.
- [IsValidWithLog](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/isvalidwithlog.md): Determines if an object is valid. Also provides a report on errors if this object happens not to be valid.
- [NonConstOperation](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/nonconstoperation.md): For derived classes implementers. Defines the necessary implementation to free the instance from being constant.
- [OnSwitchToNonConst](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/onswitchtononconst.md): Is called when a non-constant operation first occurs.
- [ToJSON](https://developer.rhino3d.com/api/rhinocommon/type/rhino.runtime.commonobject/tojson.md): Create a JSON string representation of this object
