C# and vb

G

Guest

I have been using vb in visual studiio (windows programming), but now I am
looking at asp. I notice that most of the books I look at use C#. I know
booth languages are very similar execept for syntax, but I am more
confortable with VB. My questions are: 1) Is it just a matter of preference
as to with language is used and 2) can I convert sample code from the books I
am looking at from C# to VB.
Thanks,
 
G

Guest

Regarding your second question, there are a few C# to VB converters available:

Instant VB: our C# to VB converter
Clarity Consulting: comes with Visual Studio
Various on-line converters

Try them out to find one that suits you (we have a free demo -
www.instantvb.com).

--
David Anton
www.tangiblesoftwaresolutions.com
Instant C#: VB.NET to C# Converter
Instant VB: C# to VB.NET Converter
Instant C++: C# to C++ Converter
Instant J#: VB.NET to J# Converter
 
A

Abel Eduardo Pereira

Hi Stan,

Concerning the first question, I believe it's indeed a matter of preference
(there are no meaningful advantages of using C# or VB .NET).
Concerning the second question, I use to use SharpDevelop IDE to convert
from VB .NET to C# (the opposite is also available). However, at this time,
it only works with the framework v1.1.
 
C

Cor Ligthert [MVP]

Stanley,

That is strange, however it can be that ASP had to be done in VB and
therefore the C# programmer is less used to ASPNET.

Be aware however that in ASPNET the samples are often showed as scripting,
while using a DLL is much nicer. Using the DLL has in the ASPNET world the
strange name "Code Behind".

This gives you as well more security than all kind of other things that are
written. Unlucky enough are most samples done in the by ASP programmers used
scripting style while using ASPNET code.

I would put a book that is using only Scripting in ASPNET direct at the
garbage.

I hope this gives some ideas

Cor
 
J

John Timney \( MVP \)

if you are more comfortable with VB.NET then stick with it, you wont gain
much (unless there is a premium for c# devs where you live) by making a
switch. That said, thats exactly what I did and I no longer programme in
vb. It was a syntax thing, I prefer the c# syntax.

You should be able to convert from one to the other and doing it manually is
the best way to learn. If your buying books, general programming books
won't usually teach you about the more advanced aspects of asp.net so get
one for aimed at beginners and then once your comfortable with the very
different environment your stepping into you can move up to something more
advanced. There are just as many vb.net books as there are c# books.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
O

Olaf Baeyens

if you are more comfortable with VB.NET then stick with it, you wont gain
much (unless there is a premium for c# devs where you live) by making a
switch. That said, thats exactly what I did and I no longer programme in
vb. It was a syntax thing, I prefer the c# syntax.
Did anyone notice that the VB versus C# flame wars are gone? :)
Now the standard answer is: "If you are more comfortable with VB.NET then
stick with it, you wont gain much" :)

Finally VB programmers and C#/C++ programmers live happely with each other
:)
 
J

John Timney \( MVP \)

A good developer knows if you need to use both languages with .NET you can
so the argument in a flame war about whihc was better was always a bit
pointless and could only ever really come down to which paid more, or the
cost implications of one over another to a given company or project.

However, you are correct and I have also noticed there is less bickering
about which is right and more sensible advice being given. Thats a good
thing.

--
Regards

John Timney
ASP.NET MVP
Microsoft Regional Director
 
O

Olaf Baeyens

A good developer knows if you need to use both languages with .NET you can
so the argument in a flame war about whihc was better was always a bit
pointless and could only ever really come down to which paid more, or the
cost implications of one over another to a given company or project.
I know that the transition was hard for the VB people, but with VS 2005 I
don't think they can't complain anymore.
I cursed MFC a lot (I came from Delphi) but with the .NET I can say that
they have finally made the right thing.

And now that so many VB people are moving to the .NET I am also happy to
know that now the resistance to install the .NET is going to lower since
more and more programs will require the .NET. Ater pushing the .NET since
2002, I finally am happy that people everywhere finally start to accept it
and see that all those years I knew what I was doing. :)

I hope that next CLR has some intelgence to analyze the performance of a
program and recompiles some part to speed it up even more. :)
Fully automatically, the more the user uses this function, than that
function becomes even faster :)
Or am I dreaming. ;-)
 
J

John Kn [MS]

Stan:

First, when you say VB, are referring to Visual Basic or VB .Net?

If your answer is VB .NET then, my answers are:

1) Is it just a matter of preference as to with language is used.
C# tends to be a little more robust than VB .Net. Although many will
disagree, that said, try both and see which you are the most comfortable
with.

2) Can I convert sample code from the books I am looking at from C# to VB.?
There are many C# to VB .Net converters:
A. APP: Instant VB: C# to VB.NET Converter -
http://www.instantcsharp.com/ (Not Free)
B. OnLine: Visual C# to Visual Basic .NET Converter - utility:
http://csharpconverter.claritycon.com/ (Seems Free)
C. OnLine: Convert C# 2.0 Code to VB.NET 8.0 -
http://developer.sharpdevelop.net/codeconvert.net/convertcsharp20tovbnet80.a
spx (Free)

Beware, no two languages are 1:1 translatable, you may have to do a little
cleaning up when you build.

Happy converting.


--------------------
Thread-Topic: C# and vb
thread-index: AcX8RI3D28MUzfBRS72oev/msS8e1g==
X-WBNR-Posting-Host: 67.101.74.178
From: "=?Utf-8?B?U3RhbmxleQ==?=" <slevy@newyorkny>
Subject: C# and vb
Date: Thu, 8 Dec 2005 14:13:01 -0800
Lines: 9
Message-ID: <[email protected]>
MIME-Version: 1.0
Content-Type: text/plain;
charset="Utf-8"
Content-Transfer-Encoding: 7bit
X-Newsreader: Microsoft CDO for Windows 2000
Content-Class: urn:content-classes:message
Importance: normal
Priority: normal
X-MimeOLE: Produced By Microsoft MimeOLE V6.00.3790.0
Newsgroups: microsoft.public.dotnet.general
NNTP-Posting-Host: TK2MSFTNGXA03.phx.gbl 10.40.2.250
Path: TK2MSFTNGXA02.phx.gbl!TK2MSFTNGXA03.phx.gbl
Xref: TK2MSFTNGXA02.phx.gbl microsoft.public.dotnet.general:184142
X-Tomcat-NG: microsoft.public.dotnet.general

I have been using vb in visual studiio (windows programming), but now I am
looking at asp. I notice that most of the books I look at use C#. I know
booth languages are very similar execept for syntax, but I am more
confortable with VB. My questions are: 1) Is it just a matter of preference
as to with language is used and 2) can I convert sample code from the books I
am looking at from C# to VB.
Thanks,

{\rtf1\ansi\ansicpg1252\deff0\deflang1033{\fonttbl{\f0\fnil\fprq2\fcharset0
MS Sans Serif;}{\f1\fswiss\fcharset0 Arial;}}
{\*\generator Msftedit 5.41.21.2500;}\viewkind4\uc1\pard\f0\fs20 Cheers,\par
\par
johnKn [MS-SDK]\par
\par
\par
\par
-Please do not send email directly to this alias. This alias is for \par
newsgroup purposes only\par
\par
-This posting is provided "AS IS" with no warranties, and confers no
rights.\par
\par
-To provide additional feedback about your community experience please send
\par
e-mail to: (e-mail address removed)\par
\f1\par
}
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top