NOTE: This site is deprecated. The site will be turned down after January 31, 2023, and traffic will redirect to the new site at https://protobuf.dev. In the meantime, updates will be made only to protobuf.dev.
Stay organized with collections Save and categorize content based on your preferences.

Google.Protobuf.IDeepCloneable< T >

Generic interface for a deeply cloneable type.

Summary

All generated messages implement this interface, but so do some non-message types. Additionally, due to the type constraint on T in IMessage{T}, it is simpler to keep this as a separate interface.

Details
Template Parameters
T
The type itself, returned by the Clone method.

Inheritance

Direct Known Subclasses:Google.Protobuf.Collections.MapField< TKey, TValue >, Google.Protobuf.Collections.RepeatedField< T >, Google.Protobuf.IMessage< T >

Public functions

Clone()
T
Creates a deep clone of this object.

Public functions

Clone

T Clone()

Creates a deep clone of this object.

Details
Returns
A deep clone of this object.