MimeTypeInfoICloneableClone Method

Creates a new object that is a copy of the current instance.

Definition

Namespace: FolkerKinzel.MimeTypes
Assembly: FolkerKinzel.MimeTypes (in FolkerKinzel.MimeTypes.dll) Version: 5.6.0+6976b8f96f59170e54fb7f8a4989b77d09f9b1c0
C#
Object ICloneable.Clone()

Return Value

Object
A new object that is a copy of this instance.

Implements

ICloneableClone

Remarks

If you intend to hold a MimeTypeInfo for a long time in memory and if this MimeTypeInfo is parsed from a ReadOnlyMemory<Char> that comes from a very long String, keep in mind, that the MimeTypeInfo holds a reference to that String. Consider in this case to make a copy of the MimeTypeInfo structure: The copy is built on a separate String that is case-normalized and only as long as needed.

  Tip

Use the instance method Clone, if you can, to avoid the costs of boxing.

See Also