Is it worth while in developing VB.NET or C#.NET

V

vighnesh

Hello Everyone

I am about to develop a project like Registry Mechanic using either VB.NET
or C#.NET.
But I dont know is it worth while in using these languages ? I mean is there
necessary support
provided in .NET to accomplish this task? If Provided please suggest me the
approach.

Regards
Vighneswar
 
G

Guest

Don't think of C# and VB.NET as two seperate languages, but as two syntaxs
for the .NET Framework. Ultimately you are targeting the .NET Framework and
using the .NET Framework base classes.

Although there are a very small number of syntax specific features that are
present in or, and not the other (optional parameters, operator overloading,
direct pointer manipulation, etc) it boils down to whether you perfor curly
braces and semi-colons or verbose key words. In general, one does not have
an advantage over the other.
 
H

Homer J Simpson

I am about to develop a project like Registry Mechanic using either VB.NET
or C#.NET.
But I dont know is it worth while in using these languages ? I mean is
there necessary support
provided in .NET to accomplish this task? If Provided please suggest me
the approach.

Surely the registry is fairly easy to access and update? So use whichever
you like best.
 
C

Cor Ligthert [MVP]

Vignesh,

There is one part that is not in VBNet while it is in C#. That is unsafe
code which makes it you possible to do some more raw processes with the OS.

Therefore I would choose for your problem probably direct C#

I hope this helps,

Cor
 
G

Guest

If he needs to work w/ the registry he can use the Microsoft.Win32.Registry
and Microsoft.Win32.RegistryKey classes to do so. This can be done in either
VB.NET or C#. How does direct pointer manipulation give him an advantage?
 
C

Cor Ligthert [MVP]

rmacias,

In my opinion is the Registry one point, however to see if the registry is
correct you have to do investigations. That part seems for me the more
difficult part. Not the registry itself what is straight forward both in C#
and VB.Net

Just my thought,

Cor
 
M

m.posseth

Hmmm Cor are you moving to the dark side ? :)

if this is actually needed i would say go for C++

regards

Michel Posseth [MCP]
 
B

Brooke

I have used VB since it was released and I was actually a beta tester
when it was called Thunder back around 1990. I picked up VB.NET when it was
first released, and developed a few applications using it, but quickly made
the transition to C#. In the last 5 years I have came to the conclusion
that it is best to know the "Three C's". The "Three C's" are C, C++, and
C#.

My reasoning for this is that most embedded development is done in C,
the other OS's use C and C++ and their main development languages, there are
millions of lines of C and C++ code that can easily be converted to C#, Java
and C# are almost identical which makes learning Java easy, the source code
for .NET is in C#, as a contractor I definitely make more money on C#
contracts than VB.NET. You also cannot just jump from VB 6 to VB.NET as it
is completely different. Since you will have to learn a new language coming
from VB6 it makes sense to just move to C#.

If you plan on just writing code for Windows then either language will
work. But if you want to be a develop for other operating systems (UNIX,
LINUX, Embedded, Firmware, etc) then C# is the way to go.
 
H

Herfried K. Wagner [MVP]

Brooke said:
I have used VB since it was released and I was actually a beta tester
when it was called Thunder back around 1990. I picked up VB.NET when it
was first released, and developed a few applications using it, but quickly
made the transition to C#. In the last 5 years I have came to the
conclusion that it is best to know the "Three C's". The "Three C's" are
C, C++, and C#.

I do not see many similarities between C/C++ and C#. So learning C# won't
make one more familiar with C/C++. While I think that C/C++ still have a
place in low-level development, I don't think that a legacy syntax which is
optimized for easy input through ancient devices should have its place in
modern, high-level application development (user mode applications).
If you plan on just writing code for Windows then either language will
work. But if you want to be a develop for other operating systems (UNIX,
LINUX, Embedded, Firmware, etc) then C# is the way to go.

I have to disagree. Both, the VB.NET and the C# compiler emit IL, so it
should not really matter which of the two programming languages one is using
for platform independent development.
 
H

Homer J Simpson

My reasoning for this is that most embedded development is done in C

This is true. It does not indicate that this is a good idea. Beware of the
'fashionable' - it changes often. My first computer language was Algol-68.

IMO, Pascal would be a better choice for embedded development. There would
be far less debugging and fixing that would have to be done if a P-Code
interpreter executed P-Code created by a robust compiler.

However, if you only have a hammer everything looks like a nail. If you only
know Java, guess which language you will prefer.
 
J

Jon Skeet [C# MVP]

Herfried K. Wagner said:
I do not see many similarities between C/C++ and C#.

Not even in syntax? I'm perfectly well aware that the majority of
differences between VB.NET and C# are just in syntactical - but coming
from a C/C++/Java background I was able to pretty much immediately read
a lot of C# code, whereas it takes me a lot longer to read VB.NET with
its fairly significantly different syntax. It's a case of familiarity,
that's all.
So learning C# won't make one more familiar with C/C++. While I think
that C/C++ still have a place in low-level development, I don't think
that a legacy syntax which is optimized for easy input through
ancient devices should have its place in modern, high-level
application development (user mode applications).

Some of us like terse syntax for reasons other than easy input.
I have to disagree. Both, the VB.NET and the C# compiler emit IL, so it
should not really matter which of the two programming languages one is using
for platform independent development.

I think Brooke's point here is that if you're going to work in Unix,
Linux etc, you may well end up writing non-.NET code - in which case,
C# is a better starting point as it's *closer* to C/C++/Java than
VB.NET is.
 
H

Herfried K. Wagner [MVP]

Jon Skeet said:
Not even in syntax?

There are some similarities in syntax, but especially in terms of
object-orientiation C++ and C# differ significantly. Additionally C#'s
semantics are close to those of VB6 (references instead of pointers) too.
but coming from a C/C++/Java background I was able to pretty
much immediately read a lot of C# code

How long does it take to learn how 'for', 'do', etc. work in C# if you are
familiar with another programming language, be it VB(.NET) or C(++)? One
day? Two days? I have both a C/C++ and VB background, so I do not know,
but once I have understood how a certain thing works in one of the two
programming languages VB.NET and C# I can quickly find out how to archieve
the same in the other programming language.
I think Brooke's point here is that if you're going to work in Unix,
Linux etc, you may well end up writing non-.NET code - in which case,
C# is a better starting point as it's *closer* to C/C++/Java than
VB.NET is.

Again: Which knowledge of C# can be easily applied to C/C++? The syntax of
some loop types and a few keywords. There are /so many/ differences that
reusing this knowledge is really insignificant and IMO should not be a
reason for preferring C# over VB.NET.
 
C

Cor Ligthert [MVP]

Jon/Herfried,
I think Brooke's point here is that if you're going to work in Unix,
Linux etc, you may well end up writing non-.NET code - in which case,
C# is a better starting point as it's *closer* to C/C++/Java than
VB.NET is.

What are your answers related to the question from the OP.

I don't believe that this is asked for Linux or Unix.

:)

Cor
 
J

Jon Skeet [C# MVP]

Herfried K. Wagner said:
There are some similarities in syntax, but especially in terms of
object-orientiation C++ and C# differ significantly. Additionally C#'s
semantics are close to those of VB6 (references instead of pointers) too.

Sure. All of that just says that it's not going to be a breeze going
from either C# or VB.NET to C/C++ though. The similarities in syntax,
case-sensitivity etc are going to *help* though.
How long does it take to learn how 'for', 'do', etc. work in C# if you are
familiar with another programming language, be it VB(.NET) or C(++)? One
day? Two days? I have both a C/C++ and VB background, so I do not know,
but once I have understood how a certain thing works in one of the two
programming languages VB.NET and C# I can quickly find out how to archieve
the same in the other programming language.

It's not a question of *learning* it though - it's a case of being
*comfortable* with a type of syntax. I know I find there's a certain
period when I go between Java and C# where I use the wrong naming
conventions and have to keep correcting myself. Can you really say
there wouldn't be the same kind of difficulty going from VB.NET to
C/C++ in terms of semi-colons, case-sensitivity, and just not be
familiar with the operators?
Again: Which knowledge of C# can be easily applied to C/C++? The syntax of
some loop types and a few keywords. There are /so many/ differences that
reusing this knowledge is really insignificant and IMO should not be a
reason for preferring C# over VB.NET.

It's a comfort thing - and unless you can give me any advantage to
picking VB.NET over C# in terms of moving to C/C++, the small advantage
C# *does* offer for that transition is enough to make it a reason for
preferring C# over VB.NET - if, of course, the prospect of writing
C/C++ in the future is a significant one in the first place.
 
C

Carlos J. Quintero [VB MVP]

Hi Brooke,

Brooke said:
I have came to the conclusion that it is best to know the "Three C's".
The "Three C's" are C, C++, and C#.

As developers, the more languages you know, the better. You don´t have to
stop at the three C's, and VB.NET, Java, etc. are also assets in your
career.
You also cannot just jump from VB 6 to VB.NET as it is completely
different.

This is not actually true, we could agree that VB6 is different than VB.NET
but not completely, the syntax is quite the same for the most part. Other
thing is that the underlying concepts of the .NET Framework are completely
different. Once you understand the .NET Framework concepts, choosing a
syntax or another is a matter of confort, IMHO.

Just my 2 cents.

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
 
F

Fabio

How long does it take to learn how 'for', 'do', etc. work in C# if you are
familiar with another programming language, be it VB(.NET) or C(++)? One
day? Two days?

How much does a "standard" vb6 programmer take to understand that to get a
substring he should do string.Subtring() and not Mid(string,...)? And why
Form1.Show() does not works (unfortunately, not true with vs2005).

In this scenario passing directly to c# avoid him to "fall in tentation" :)
because it's true that both vb.net and c# produces IL, but what is the
quality of this IL if vb.net is used as vb7?
 
F

Fabio

This is not actually true, we could agree that VB6 is different than
VB.NET but not completely, the syntax is quite the same for the most part.
Other thing is that the underlying concepts of the .NET Framework are
completely different. Once you understand the .NET Framework concepts,
choosing a syntax or another is a matter of confort, IMHO.

You're right!
The problem is: will a vb6 programmer understand the difference from vb6-COM
and vb.net-.net framework?
I think that it was good if a vb6 programmer know that vb6 uses COM (note
I'm a vb6 programmer that see how people of my team write vb6 code).
 
H

Herfried K. Wagner [MVP]

Fabio said:
How much does a "standard" vb6 programmer take to understand that to get a
substring he should do string.Subtring() and not Mid(string,...)?

I am wondering where you got the perception that 'Mid' should not be used!
 
C

Carlos J. Quintero [VB MVP]

Hi Fabio,
The problem is: will a vb6 programmer understand the difference from
vb6-COM and vb.net-.net framework?

I suppose so, otherwise he won´t go too far.... ;-)
I think that it was good if a vb6 programmer know that vb6 uses COM (note
I'm a vb6 programmer that see how people of my team write vb6 code).

I think that most VB6 programmers know that it VB6 uses COM (ActiveX), but I
always get stunned when some VB6 developer asks me what regsvr32.exe is...
;-)

--

Best regards,

Carlos J. Quintero

MZ-Tools: Productivity add-ins for Visual Studio
You can code, design and document much faster:
http://www.mztools.com
 

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