Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Detecting the creation of an object
Message
From
24/02/2004 16:01:30
 
 
To
24/02/2004 15:56:10
General information
Forum:
ASP.NET
Category:
Other
Miscellaneous
Thread ID:
00880446
Message ID:
00880468
Views:
30
Michel,

I don't know VB syntax, sorry. I used the two C#-to-VB converters to create the code snippet, and they both produced the same code. Anyway, the problem is that you need to instantiate the loContext object and you haven't done that. You've just defined it as SoapContext.

~~Bonnie


>>You forgot to instantiate the object. Here's the correct code (plus the checking for nothing if you still want to do that):
>>
>>Dim loContext As SoapContext
>>loContext = New SoapContext()
>>If Not (loContext Is Nothing) Then
>>   loContext = HttpSoapContext.ResponseContext
>>End If
>>
>
>This generates an error on the 2nd line. First, the parentheses are not kept. Then, the error is underlining "New SoapContext".
Bonnie Berent DeWitt
NET/C# MVP since 2003

http://geek-goddess-bonnie.blogspot.com
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform