doug in co
New member
- Joined
- Mar 12, 2004
- Messages
- 1
I have a C# wrapper class which defines certain parameters for a RPC call. This is called from a VB.NET form which populates the parameters. I cannot figure out how to populate the one group - cant find a way around the dreaded reference to a non-shared member requires an object reference. I understand that I need to instantiate the object, but cant see a way to do it so that the group is populated within the parameters.
Extract of C# code:
public class Jat300n0
{
public class Jat300a0Parms
{
public string rMaxKey;
public RFilterValues rFilterValues = new RFilterValues();
public class RFilterValues
{
public bool rFilterSet;
public string rFilterStatus;
}
In the VB form:
Dim objparams As New Jat300n0.Jat300a0Parms()
Try
Input parameters for JAT300N0
With objparams
.rMaxKey = "8116 999999999999999"
.rFilterValues.rFilterSet = False
.rFilterValues.rFilterStatus = ""
End With
I thought the rFilterValues in the VB code would reference the object created in the C# code
public RFilterValues rFilterValues = new RFilterValues();
but it still generates the error.
If I instantiate the RFilterValues in the VB code,
Dim rfilter As New Jat300n0.Jat300a0Parms.RFilterValues();
then this will not be part of the objparams that are later passed in the RPC call.
Anyone have any suggestions ? All appreciated..
Extract of C# code:
public class Jat300n0
{
public class Jat300a0Parms
{
public string rMaxKey;
public RFilterValues rFilterValues = new RFilterValues();
public class RFilterValues
{
public bool rFilterSet;
public string rFilterStatus;
}
In the VB form:
Dim objparams As New Jat300n0.Jat300a0Parms()
Try
Input parameters for JAT300N0
With objparams
.rMaxKey = "8116 999999999999999"
.rFilterValues.rFilterSet = False
.rFilterValues.rFilterStatus = ""
End With
I thought the rFilterValues in the VB code would reference the object created in the C# code
public RFilterValues rFilterValues = new RFilterValues();
but it still generates the error.
If I instantiate the RFilterValues in the VB code,
Dim rfilter As New Jat300n0.Jat300a0Parms.RFilterValues();
then this will not be part of the objparams that are later passed in the RPC call.
Anyone have any suggestions ? All appreciated..