如何将给定的c#代码转换为vb.net [英] how do I convert the given c# codes to vb.net
本文介绍了如何将给定的c#代码转换为vb.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我对c#完全陌生。我有一个小应用程序,我将应用程序从c#转换为vb.net。
我如何写
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
MyObject data = js.Deserialize<MyObject>(jsonResponse);
到vb.net。
我在谷歌搜索并附带
to vb.net.
I searched on google and came with
Dim data As MyObject = js.Deserialize(Of MyObject)(jsonResponse)
但显示错误
but its showing error
Type 'MyObject' is not defined. .
请帮助。
Kindly help.
推荐答案
正如Chill60建议的那样,你需要转换Generic所用的类。以下示例:MyObject,要么包含相关的Import语句,要么完全限定名称。
(已回复以从未答复的列表中删除)
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)
这篇关于如何将给定的c#代码转换为vb.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文