set variable of partial class

stoffel79 21 Reputation points
2021-02-06T21:57:43.177+00:00

I have a generated clas (with soapui)

I need to pas data to a class order
This class has partial classes

The code :

64873-2021-02-04-3.png

64717-2021-02-04-2.png

64836-2021-02-06-2.png

This is what i try and th error i get ....

 Dim orders(1) As dpd_label.order  
            orders(1) = New dpd_label.order()  
  
  
            With orders(1)  
                .generalShipmentData.sendingDepot() = ""  'this line gives a error : System.NullReferenceException: 'De objectverwijzing is niet op een exemplaar van een object ingesteld.'  
                'dpd.dpd_label.order.get_generalShipmentData returned Nothing.  
  
  
            End With  
  
            Dim result  
            Dim start As New dpd_label.ShipmentServiceSoap33  
            result = start.storeOrders(printoptions, orders)  
  

could sombody show me how to do it ?

Thanx in advance !

Entity Framework Core
Entity Framework Core
A lightweight, extensible, open-source, and cross-platform version of the Entity Framework data access technology.
751 questions
.NET
.NET
Microsoft Technologies based on the .NET software framework.
3,921 questions
ASP.NET
ASP.NET
A set of technologies in the .NET Framework for building web applications and XML web services.
3,507 questions
VB
VB
An object-oriented programming language developed by Microsoft that is implemented on the .NET Framework. Previously known as Visual Basic .NET.
2,737 questions
.NET Runtime
.NET Runtime
.NET: Microsoft Technologies based on the .NET software framework.Runtime: An environment required to run apps that aren't compiled to machine language.
1,166 questions
0 comments No comments
{count} votes

Accepted answer
  1. Ken Tucker 5,856 Reputation points
    2021-02-07T12:34:35.397+00:00

    generalShipmentData is a class you need to create an instance before you can use it without getting a null reference exception

            orders(1) = New dpd_label.order()
    
            orders(1).generalShipmentData = new generalShipmentData()
    
    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.