Jump to content
Software FX Community

nullable properties?


mtsu_bravo

Recommended Posts

I think I found a bug, below is a test case.

Public Class test

  Private _age As Nullable(Of Integer)

  Private _date As DateTime = Date.Now

  Public Property age() As Nullable(Of Integer)

  Get

  age = _age

  End Get

  Set(ByVal Value As Nullable(Of Integer))

  _age = Value

  End Set

  End Property

  Public Property dateNow() As DateTime

  Get

  dateNow = _date

  End Get

  Set(ByVal Value As DateTime)

  _date = Value

  End Set

  End Property

End Class

 

Dim testList As IList(Of test) = New List(Of test)

  Dim test1 As test = New test

  Dim test2 As test = New test

  Dim test3 As test = New test

  test1.age = 14

  testList.Add(test1)

  test2.age = 15

  testList.Add(test2)

  test3.age = 34

  testList.Add(test3)

  Chart1.DataSource = testList

  Chart1.DataBind()

 

any time I have a property with a type of nullable it just puts in zeros for the values. I saw some other posts were they had similar problems but were not using list objects.

Link to comment
Share on other sites

  • 4 months later...
  • 1 month later...

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...