Stroke.AddPropertyData(Guid, Object) 메서드
정의
중요
일부 정보는 릴리스되기 전에 상당 부분 수정될 수 있는 시험판 제품과 관련이 있습니다. Microsoft는 여기에 제공된 정보에 대해 어떠한 명시적이거나 묵시적인 보증도 하지 않습니다.
개체에 사용자 지정 속성을 Stroke 추가합니다.
public:
void AddPropertyData(Guid propertyDataId, System::Object ^ propertyData);
public void AddPropertyData(Guid propertyDataId, object propertyData);
member this.AddPropertyData : Guid * obj -> unit
Public Sub AddPropertyData (propertyDataId As Guid, propertyData As Object)
매개 변수
- propertyDataId
- Guid
속성의 고유 식별자입니다.
- propertyData
- Object
사용자 지정 속성의 값입니다.
propertyData는 허용되지 않는 경우를 제외하고 이러한 데이터 형식의 CharByteInt16UInt16Int32UInt32Int64UInt64SingleDoubleDateTimeBooleanStringDecimal 배열, 또는 이러한 데이터 형식의 배열이어야 합니다.String
예외
인수는 propertyData 섹션에 나열된 허용된 Parameters 데이터 형식 중 하나가 아닙니다.
예제
다음 예제에서는 개체에 사용자 지정 속성을 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
설명
이 메서드는 추가 정보를 Stroke저장해야 하는 경우에 유용합니다.