EH-Net

Ethical Hacking Discussions and Related Certifications => Programming => Topic started by: Chuck on April 21, 2007, 01:10:48 AM



Title: Newbie: VB.NET or C#
Post by: Chuck on April 21, 2007, 01:10:48 AM
I am about to take a class and I have the option of taking programming being taught using either VB.NET, C#, or pseudo. I took a Logic and Design class in Pseudo and would like to start learning an actual program.

So given the choice between learning .NET or C# as your first language which would you choose? Which will be most useful, I am not so much worried about ease of learning, as I am sure is the same with most people here, because I learn fairly quickly.


Title: Re: Newbie: VB.NET or C#
Post by: LSOChris on April 21, 2007, 04:56:43 AM
i'll have to defer, i wouldnt pick either one of those two.

ok i thought about it, how about VB.net. lots of stuff seems to be done in vb.net.

anyone else?


Title: Re: Newbie: VB.NET or C#
Post by: Craig on April 21, 2007, 03:54:33 PM
I agree with Chris, from a security perspective neither one of those languages is really ideal because they hide a lot of the internal/low-level stuff that goes on.

But, if those are your only choices, here are a few considerations for picking your poison:

1) Chris is right, from what I've seen VB.NET is used more than C#. Also, when reverse engineering, programs written in VB and/or using the .NET framework are also vastly different than those written in C or C++. So learning VB.NET could help you out down the road if you are interested in RE. VB is also a great language for easily writing Windows apps, but it's not that great if you want to do low-level stuff (my experience with it is limited however).

2) I've never used C# so I don't know how similar it is to C or C++, but I do know that it hides a lot of the low-level stuff that C/C++ don't. However, learning C# could help you pick up C more quickly (which is a good language for a security professional).

So I suppose it all really depends on what you want to do. If in doubt, I'd probably go with Chris's suggestion of VB.NET, but you might want to Google for comparisons between the two languages before you decide.


Title: Re: Newbie: VB.NET or C#
Post by: Soolari on February 25, 2009, 06:03:19 AM
Plz guyz i need 2 learn vb wch 1 is better in vb and c#


Title: Re: Newbie: VB.NET or C#
Post by: Andrew Waite on February 25, 2009, 08:33:36 AM
Soolari,

I'm confused by the question, without going into a direct comparison of the two languages if you 'need' learn VB then surely VB is better than C# in your case. Or am I missing something obvious?


Title: Re: Newbie: VB.NET or C#
Post by: jason on February 25, 2009, 08:58:11 AM
Bleh. Between the two of those, I'd have to pick something useful like c++ or perl. I suppose if I were tortured into making a decision, I'd go with c#. As to which is "better", this would entirely depend on your situation and what you were planning to do with the knowledge in the future.


Title: Re: Newbie: VB.NET or C#
Post by: sgt_mjc on February 25, 2009, 11:17:23 AM
I have doen the C# thing and it is a .NET laguage just like VB.NET. It does however, have its roots in C/C++ and there for, might be a better chouice to learn as a gateway to C/C++.


Title: Re: Newbie: VB.NET or C#
Post by: Ketchup on February 25, 2009, 11:25:17 AM
I agree with everyone, C/C++ is a much better alternative than either of these.   However, it may be too much to plunge into if you don't have a basic understand of programming.   C# is more rooted in C/C++.   Pointers and more low level code are available to C#.   VB.NET is an easier language.   

With either one of them, if you want to do some "hacking,"  you would have to make a lot of API calls.   These are not fun and many datatypes from C do not translate well into any Managed language.


Title: Re: Newbie: VB.NET or C#
Post by: timmedin on February 27, 2009, 03:52:15 PM
I agree with everyone, C/C++ is a much better alternative than either of these.   However, it may be too much to plunge into if you don't have a basic understand of programming.   C# is more rooted in C/C++.   Pointers and more low level code are available to C#.   VB.NET is an easier language.   

With either one of them, if you want to do some "hacking,"  you would have to make a lot of API calls.   These are not fun and many datatypes from C do not translate well into any Managed language.

I used to be a developer and coded in both C# and VB.Net and between the two I'd definately recommend C#. It is much tighter than VB and it is the way Microsoft is going. As recently as a few years ago (it may or may not still be the case) there were some caveats posted by Microsoft about VB, things that could only be done in C# and not in VB.

C# and VB.Net aren't too much different from a difficult level any more. There is a pretty tight convergence between the two especially since all the underlying objects are the same.

I (contrary to everyone else) would recommend staying away from C++ unless you are intending to work in security. No chance for buffer overflows or such bugs to create security holes.

Perl, stay away from that. I've used it and I don't like it. I have heard it refered to as the "read-only language". You can write something and it works, but you can't figure out what by looking at the code.


Title: Re: Newbie: VB.NET or C#
Post by: munkeyfreenix .batcat on March 11, 2009, 07:01:51 PM
I would go with C#. If you're gonna take a class, then at least get a class's worth of info. VB can be learned relatively quickly on your own time.

C# is pretty much a Java clone, so if you get it, then Java will also come easily. They're strongly typed languages, and come with extensive libraries designed to make development go faster, but hide their internals.

Quote
I agree with everyone, C/C++ is a much better alternative than either of these.   However, it may be too much to plunge into if you don't have a basic understand of programming.

I disagree. I had NO programming experience when I jumped--err, plunged-- into a dumpster and found Herb Schildts Teach Yourself C. First language I ever used, so approaching any new language has always been simple after that.