both vb.net and C# used for windows application
then on every new project why we get different code file?
C#
namespace WindowsApplication7
{
public partial class Form1 : Form
{
public Form1()
{
InitializeComponent();
}
}
}
VB.NET
Public Class Form1
End Class
can anyone tell me the why?
thank you..!


Jaish MathewsRank #225 · 11K reputationPosted Jul 17, 2010, 9:38 AM EDT
VB.NET has the responsibility of carry forward the VB6.0 syntax. Because Microsoft don't need the big VB6.0/COM programmers to go some where rather than migrate to .NET. The syntax of VB.NET resembles with VB6.0. So VB6.0 developers can easily migrate to .NET. But C# is an entirely new language developed only for .NET. Thta's why they C# and VB.NET syntax are different. But after compilation and converted to CIL language, both may not showing any difference. You please try this by opening 2 assemblies in ILDASM tool.
Bruce Roeser47 reputationPosted Jul 17, 2010, 9:32 AM EDT
VB.Net hides a lot more of the low-level code details from the user. VB is intended as an easier entry-level for a developer in .Net than C# is. You can look at the lower-level details in VB if you want to but the overall concept of VB is relative simplicity.
The underlying details are the same for both languages, the presentation to the developer is different, that's all.
-bwr-
Sam HobbsRank #107 · 20.5K reputationPosted Jul 17, 2010, 12:37 PM EDT
Dipa AhujaRank #1,168 · 1.5K reputationPosted Jul 18, 2010, 4:56 AM EDT
hariom26 reputationPosted Aug 30, 2010, 4:28 AM EDT
so we need both type of files