Stroke.ContainsPropertyData(Guid) 메서드

정의

Stroke 개체에 지정한 사용자 지정 속성이 들어 있는지 여부를 나타내는 값을 반환합니다.

public:
 bool ContainsPropertyData(Guid propertyDataId);
public bool ContainsPropertyData (Guid propertyDataId);
member this.ContainsPropertyData : Guid -> bool
Public Function ContainsPropertyData (propertyDataId As Guid) As Boolean

매개 변수

propertyDataId
Guid

속성의 고유 식별자입니다.

반환

Boolean

사용자 지정 속성이 있으면 true이고, 그렇지 않으면 false입니다.

예제

다음 예제에서는 확인 하는 방법에 설명 하는지 여부를 Stroke 개체 사용자 지정 속성이 있습니다.

// Create a guid for the date/timestamp.
Guid dtGuid = new Guid("03457307-3475-3450-3035-640435034540");

DateTime now = DateTime.Now;

// Check whether the property is already saved
if (thisStroke.ContainsPropertyData(dtGuid))
{
    // Check whether the existing property matches the current date/timestamp
    DateTime oldDT = (DateTime)thisStroke.GetPropertyData(dtGuid);

    if (oldDT != now)
    {
        // Update the current date and time
        thisStroke.AddPropertyData(dtGuid, now);
    }
}
' Create a guid for the date/timestamp.
Dim dtGuid As New Guid("03457307-3475-3450-3035-640435034540")

Dim now As DateTime = DateTime.Now

' Check whether the property is already saved
If thisStroke.ContainsPropertyData(dtGuid) Then
    ' Check whether the existing property matches the current date/timestamp
    Dim oldDT As DateTime = CType(thisStroke.GetPropertyData(dtGuid), DateTime)

    If oldDT <> now Then
        ' Update the current date and time
        thisStroke.AddPropertyData(dtGuid, now)
    End If
End If

적용 대상

추가 정보