Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 900405
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T15:22:56+00:00 2026-05-15T15:22:56+00:00

I am new to VB.net and facing a strange situation. I have a structure

  • 0

I am new to VB.net and facing a strange situation. I have a structure that contains another structure. The inner structure is nullable. Now wht I do is something like the following. I create a new instance of the inner structure, set the member variables and assign the whole structure to the inner structure of the parent. But it is giving an error. The assignment is not successful. If I try to peek into the structure in the watch window, it says “property evaluation failed” for the HasValue and Value properties.

 Dim testData As List(Of TestData) = Nothing

  Dim testData_List1 As New TestData
        With testData_List1.commonTestParam
            .AccuchekActiveEnergy = 2.56
            .AccuchekActiveEnergyUnit = ActiveEnergyUnit.KiloWattHour
            .AccuchekApparentEnergy = 34.56
            .AccuchekApparentEnergyUnit = ApparentEnergyUnit.VoltAmpereHour
            .AccuchekFrequency = 1
            .AccuchekRange = "20474 ewr 34324"
            .AccuchekType = AccuchekType.AccuchekOne
            .ActiveLoadRPhase = 145
            .AvgActiveLoad = 2.56
            .AvgActiveLoadUnit = ActiveLoadUnit.Watt
            .AvgPowerFactor = 0
            .AvgPowerFactorType = PowerFactorType.PFLag
            .ConditionalFlag1 = 0
            .ConsumerNo = "343122050242"
            .CurrentRPhase = 1
            .GeneralFlag1 = 0
            .InstantaneousPFRPhase = 2
            .ManufacturingYear = 2009
            .MeterActiveEnergy = 258.89
            .MeterActiveEnergyUnit = ActiveEnergyUnit.KiloWattHour
            .MeterActiveError = 20
            .MeterApparentError = 14
            .MeterConstant = 3200
            .MeterConstantUnit = MeterConstantUnit.RevsPerkVAh
            .MeterMake = "DS"
            .MeterSNo = "6563402"
            .MeterTypeAndClass = MeterTypeAndClass.MTCElectorMechWith20
            .MTFID = "123456789"
            .NoofTestRevolutions = 100
            .PulseCriteria = 0
            .RatedBasic = 25
            .RatedMax = 30
            .RatedVoltage = 15
            .ReactiveCurrentRPhase = 145
            .RemarkID = 0
            .TestDateAndTime = "100320101545"
            .TestDuration = 2145
            .TesterCode = 0
            .TestID = "147852"
            .TestMode = TestMode.TMOpticalScanner
            .TestNumber = 0
            .VoltageRPhase = 145
        End With

       Dim accuchek3TestParameters1 As New Accuchek3PhaseTestParameters

        With accuchek3TestParameters1
            .AccuchekReactiveLagEnergy = 2.46
            .AccuchekReactiveLagEnergyUnit = ReactiveEnergyUnit.KiloVoltAmpereReactiveHour
            .AccuchekReactiveLeadEnergy = 2.56
            .AccuchekReactiveLeadEnergyUnit = ReactiveEnergyUnit.KiloVoltAmpereReactiveHour
            .ActiveLoadBPhase = 14
            .ActiveLoadYPhase = 15
            .AvgApparentLoad = 10
            .AvgApparentLoadUnit = ApparentLoadUnit.KiloVoltAmpere
            .AvgReactiveLagLoad = 14
            .AvgReactiveLagLoadUnit = ReactiveLoadUnit.KiloVoltAmpereReactive
            .AvgReactiveLeadLoad = 15
            .AvgReactiveLeadLoadUnit = ReactiveLoadUnit.KiloVoltAmpereReactive
            .ConditionalFlag2 = 0
            .ConditionalFlag3 = 0
            .CTRatio = 1.23
            .CurrentBPhase = 10
            .CurrentYPhase = 11
            .InstantaneousPFBPhase = 0
            .InstantaneousPFYPhase = 1
            .MeterApparentEnergy = 1.01
            .MeterApparentUnit = ApparentEnergyUnit.KiloVoltAmpereHour
            .MeterReactiveLagEnergy = 1.25
            .MeterReactiveLagError = 1.25
            .MeterReactiveLagUnit = ReactiveEnergyUnit.KiloVoltAmpereReactiveHour
            .MeterReactiveLeadEnergy = 1.45
            .MeterReactiveLeadError = 1.56
            .MeterReactiveLeadUnit = ReactiveEnergyUnit.KiloVoltAmpereReactiveHour
            .PercentageLoad = 1
            .PTRatio = 1
            .ReactiveCurrentBPhase = 10
            .ReactiveCurrentYPhase = 11
            .VoltageBPhase = 10
            .VoltageYPhase = 10
        End With

        testData_List1.accuchek3TestParameters = accuchek3TestParameters1

        testData.Add(testData_List1)

Can somebody please guide me?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-15T15:22:57+00:00Added an answer on May 15, 2026 at 3:22 pm

    Your first line is:

    Dim testData As List(Of TestData) = Nothing
    

    Then at the bottom you do

    testData.Add(testData_List1)
    

    I can’t see anywhere in between where you do something like:

    testData = New List(Of TestData)()
    

    Though it’s slightly hard to read since you’ve got both a variables and types with TestData as their name (or part of their name) so I might just be missing that.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have some internal-facing ASP.NET web services that have had numerous API additions over
I have an ASP.NET web site which contains some ImageButton controls that cause postbacks
ASP.NET - IIS 6 - we currently have a public-facing site that has a
We are facing a strange issue while sending email. It seems that the new
I am facing the problem, that I have an C# (.NET) object shared among
We're creating a new consumer/public-facing ASP.Net web app. There are two concerns: --Use cookie
New ASP.NET Web API HttpClient has been giving me some strange results. Here is
I have a new asp.net mvc project and i am trying to figure out
I am new ASP.NET and I have never used a GridView or DataGrid, but
i'm new to ASP.NET MVC and i'm facing some structural design problems. I can't

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.