CT,
I don't see an instantiation of the Me.oRequest object ... my guess is that's what it's complaining about.
For a good translator, try
http://www.carlosag.net/Tools/CodeTranslator/ (of course, it didn't help much for this particular code snippet).
~~Bonnie
>Can anyone take a stab at turning this C# example into the VB.NET equivalent code. It's quite simple I'm sure. I just moved, can't find which box I put all of my reference books into and the Visual Studio help just isn't too helpful to me at this hour.
>
>
>request.item = new Item[1];
>Item item = new Item();
>item.id = "0";
>item.unitPrice = "29.95";
>request.item[0] = item;
>
>
>I thought the following would work just fine but I keep getting the error message: 'Object reference not set to an instance of an object' when the last line of the following code block executes. It's apparent I don't understand arrays in VB/C# very well.
>
>
>Me.oItem = New Item
>Me.oItem.id = CType(Session("liItemID"), String)
>Me.oItem.unitPrice = CType(Session("liItemAmount"), Decimal)
>Me.oItem.quantity = 1
>'The code above works fine ... the error occurs when I try
>'the following.
>Me.oRequest.item(0) = Me.oItem
>
>
>Help please.
>
>Thanks,
>
>CTBlankenship