VintaSoft Imaging .NET SDK 15.1: Документация для .NET разработчика
Vintasoft.Imaging.Annotation Namespace / AnnotationData Class / Clone() Method
Синтаксис Example Требования Смотрите также
В этом разделе
Clone() Метод (AnnotationData)
В этом разделе
Создает новый объект, являющийся копией текущего экземпляра.
Синтаксис
'Declaration

Public MustOverride Function Clone() As System.Object

public abstract System.Object Clone()

Return Value

Новый объект, являющийся копией этого экземпляра.
Пример

Вот пример, показывающий, как клонировать одну аннотацию из коллекции и добавить клонированную аннотацию в ту же коллекцию:


Private Sub CloneAndAdd(annotationCollection As Vintasoft.Imaging.Annotation.AnnotationDataCollection, index As Integer)
    ' clone annotation at specified index
    Dim clonedAnnotation As Vintasoft.Imaging.Annotation.AnnotationData = DirectCast(annotationCollection(index).Clone(), Vintasoft.Imaging.Annotation.AnnotationData)
    ' add cloned annotation to the end of the collection
    annotationCollection.Add(clonedAnnotation)
End Sub


void CloneAndAdd(Vintasoft.Imaging.Annotation.AnnotationDataCollection annotationCollection, int index)
{
    // clone annotation at specified index
    Vintasoft.Imaging.Annotation.AnnotationData clonedAnnotation = 
        (Vintasoft.Imaging.Annotation.AnnotationData)annotationCollection[index].Clone();
    // add cloned annotation to the end of the collection
    annotationCollection.Add(clonedAnnotation);
}

Требования

Целевые платформы: .NET 10; .NET 9; .NET 8; .NET 7; .NET 6; .NET Framework 4.8, 4.7, 4.6, 4.5, 4.0, 3.5

Смотрите также