Click here to Skip to main content
15,886,806 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I am completely new to c#. I have a small application where I am converting the app to vb.net from c#.

How do I write

C#
MyObject data = js.Deserialize<MyObject>(jsonResponse);

to vb.net.

I searched on google and came with

VB
Dim data As MyObject = js.Deserialize(Of MyObject)(jsonResponse)

but its showing error

SQL
Type 'MyObject' is not defined. .

Kindly help.
Posted
Comments
CHill60 29-Jan-15 3:05am    
Have you got as far as converting the MyObject class is the obvious first question ?
Sergey Alexandrovich Kryukov 29-Jan-15 3:12am    
This is because you did not define MyObject type. What's unclear in this error message?
—SA
Sinisa Hajnal 29-Jan-15 3:24am    
Maybe using from c# didn't convert to Import directive or you're missing references to MyObject...

1 solution

As Chill60 suggests, you need to convert the class that the Generic is an example of: MyObject, and either include the relevant Import statement, or fully qualify the name.

(Answered to remove from unanswered list)
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900