Note that there are some explanatory texts on larger screens.

plurals
  1. POWhy is my class nothing?
    primarykey
    data
    text
    <p>I have a .NET 2010 project. In it, I create a basic user class. Instantiate it and successfully fill it with data. The entire time it is doing this, if I hover over the class, it says it is nothing, even as it fills its properties. Later on, it hoses me in the UI, even though the property has a value it says the class is nothing.</p> <p>I DO instatiate the class...</p> <p><code>Dim oExtendedUser As New ExtendedUser</code></p> <p>and here is the classs definition...</p> <pre><code>Public Class ExtendedUser Inherits System.Web.Security.MembershipUser Public Sub New() _Role = New Role End Sub Public Property ExtendedUserID As Int32 Public Property FirstName As String Public Property LastName As String Public Property Phone As String Public Property UserID As Guid Public Property Role As Role Public Property UserName() As String Public Property Password() As String Public Property SecurityQuestion() As String Public Property SecurityAnswer() As String End Class </code></pre> <p>I changed the class. I added MyBase.New() but the problem persists. On the UI, here is the code that executes when the button is clicked. Director has, as a proprety, ExtendedUSer</p> <pre><code>Dim oCase As New BE.Case Dim oDirector As New BE.Director oDirector = SessionManager.Director 'the values are here oCase.Investigator.ExtendedUserID = oDirector.ExtendedUser.ExtendedUserID </code></pre> <p>And here is the Director...</p> <pre><code>Public Class Director Public Sub New() _ExtendedUser = New ExtendedUser End Sub Public Property ID As Int32 Public Property ExtendedUser As ExtendedUser End Class </code></pre>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload