1

我需要定义一个名为end的对象,因为我从 JSON 文件中捕获了一些数据:

Imports Microsoft.VisualBasic

Public Class profesionales


Private _idResource As Integer
Private _resourceName As String
Private _start As String
Private _End As DateTime
...

'This should be End buy is a keyword
 Public Property theEnd As DateTime

    Get
        Return _End
    End Get

    Set(ByVal value As DateTime)

        _End = value
    End Set

End Property

JSON 文件

[{"idResource":1477,"resourceName":"Juan Llovet Garc\u00EDa","start":"08/07/2013 9:00","end":"08/07/2013 14:00"},{"idResource":1477,"resourceName":"Juan Llovet Garc\u00EDa","start":"08/07/2013 17:00","end":"08/07/2013 20:00"}] 

我怎样才能赶上日期结束

4

1 回答 1

3

您可以使用括号创建与关键字同名的标识符:

public Property [End] As DateTime

这会导致代码混乱,应尽可能避免。

于 2013-07-12T16:18:14.743 回答