Introduction
In today's programming era, there any many technologies and languages that developers use in application development. To stay current in the market, we need to work on more languages. These days tools are helping developers a lot.
Sometimes, we find that we are expert in C#, .NET but we are not aware of VB .NET syntax, or vice-versa. Telerik code converter provides free code conversion from C# to VB.NET and just opposite of it.
Example
I have the below C# code.
- public void GetData()
- {
- string strSQL = "select top 10 * FROM tbNews order by newsid desc";
- DataTable dt = new DataTable();
- dt = objDataAccess.GetDataTable(strSQL);
- gvUploadFiles.DataSource = dt;
- gvUploadFiles.DataBind();
- }
And I converted it into VB.NET.
- Public Sub GetData()
- Dim strSQL As String = "select top 10 * FROM tbNews order by newsid desc"
- Dim dt As DataTable = New DataTable()
- dt = objDataAccess.GetDataTable(strSQL)
- gvUploadFiles.DataSource = dt
- gvUploadFiles.DataBind()
- End Sub
We can convert code from VB .NET to C# .NET also via the swap button.
Summary
If you have some alternate way to achieve this kind of requirement, then please share. In case of some query, please leave your comments.