I want to create a note with reminder, this is my code:
'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)
but it didn't work. The error code:
myNote.Attributes.ReminderTime = DateTime.Now.ToEdamTimestamp()
Full details:
未处理System.NullReferenceException HResult=-2147467261 Message=未将对象引用设置到对象的实例。
A note's attributes are a
NoteAttributes
object, so you have to create the object first: