2017-02-14 2 views
0

와 메모를 생성하는 방법이 내 코드입니다. 오류 코드 :속성 "ReminderTime"나는 알림과 메모를 생성 할

myNote.Attributes.ReminderTime = DateTime.Now.ToEdamTimestamp() 

전체 세부 사항 :.

이 未处理 System.NullReferenceException HRESULT = -2147467261 메시지 =이 未 将 对象 引用 设置 到 对象 的 实例

+0

[NullReferenceException은 무엇이며 어떻게 수정합니까?] (http://stackoverflow.com/questions/4660142/what-is-a-nullreferenceexception-and-how-do-i-fix- 그것) –

+0

미안하지만, 나는 너를 이해하지 못한다. 다시 자세히 설명해 주시겠습니까? – 6lilu9

+0

'myNote.Attributes'는 아마도 null입니다. –

답변

1

메모의 속성은 NoteAttributes 개체이므로 먼저 개체를 만들어야합니다.

'Create a note locally. 
Dim myNote As New Note() 

myNote.Title = "Sample note with Reminder set" 
myNote.Content = "Hello, world - this note has a Reminder on it." 

'Create the note's attributes. 
Dim myNoteAttributes As New NoteAttributes 

myNoteAttributes.ReminderTime = DateTime.Now.ToEdamTimestamp() 
myNote.Attributes = myNoteAttributes  

'Create the note in the service, in the user's personal, default notebook. 
Dim store As ENNoteStoreClient =ENSessionAdvanced.SharedSession.PrimaryNoteStore 
Dim resultNote As Note = store.CreateNote(myNote) 
+0

예, 완벽하게 작동했습니다. 감사합니다.이 자습서는 어디에서 찾을 수 있습니까? – 6lilu9

+0

불행히도 Evernote Windows SDK에 사용할 수있는 자습서가 없습니다. 그러나 필요한 경우 여기에서 더 많은 질문을 할 수 있습니다. –

+0

또한 나의 대답이 당신을 위해 일했기 때문에, 나의 대답을 수락 된 대답으로 식별 할 수 있다면 좋을 것입니다. 감사! –