Vb.net 如何创建具有属性的便笺;“提醒时间”;

Vb.net 如何创建具有属性的便笺;“提醒时间”;,vb.net,evernote,reminders,evernote-app-notebook,Vb.net,Evernote,Reminders,Evernote App Notebook,我想创建一个带有提醒的便笺,这是我的代码: '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." myNote.Attributes.ReminderTime = DateTime.Now.ToEdamTimestamp()

我想创建一个带有提醒的便笺,这是我的代码:

'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."
myNote.Attributes.ReminderTime = DateTime.Now.ToEdamTimestamp()

'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)
但它不起作用。错误代码:

myNote.Attributes.ReminderTime = DateTime.Now.ToEdamTimestamp()
详情如下:

未处理System.NullReferenceException HResult=-2147467261 信息=未将对象引用设置到对象的实例。


注释的属性是
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)

抱歉,我不明白您的意思。请您再详细解释一下好吗?
myNote.Attributes
可能为空是的,它工作得很好,谢谢。我在哪里可以找到这样的教程?很遗憾,没有任何适用于Evernote Windows SDK的教程。但是如果需要的话,你可以在这里问更多的问题。而且,因为我的答案对你很有用,如果你能把我的答案确定为公认的答案,那就太好了。谢谢!