我的数据结构定义如下
website.datecreated as OneOrMany(Of DateTimeOffset?)
website.author As Values(Of Organization, Person))
如何为这些结构分配值?
背景:Schema.net - How to build using VB
答案
如何为Datetime偏移量分配值:
tsd.datecreated=#1/1/2019#
website.DateCreated = New OneOrMany(Of DateTimeOffset?)(New DateTimeOffset(tsd.dateCreated))
如何为OneOrMany结构分配值:
tsd.author="Sample Name here"
Dim personItem As New Person()
personItem.Name = New OneOrMany(Of String)?(tsd.author)
cwSchema.Author = New Values(Of Organization, Person)(New OneOrMany(Of Person)(personItem))