Results 1 to 37 of 37

Thread: C# or VB.net or VB or C++?????

  1. #1

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037

    C# or VB.net or VB or C++?????

    I can't decide which language to study. MS said that VB.net and C# are just as good as each other and I read in 2 places that C# is better than C++; it can do everything C++ can do and more.

    Can you help me decide? I want to devote my time to something worth while; something that is just as powerful as c++.

  2. #2
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    Now VB.NET can almost do 99% of what C# or C++.NET do.

    for me, VB.NET is my fancy language.

  3. #3
    Fanatic Member
    Join Date
    Sep 2002
    Posts
    518
    Keep in mind this is coming from a pretty inexperienced programmer, but I read a lot of docs

    If you want pure power, then C++ .NET is probably best since you have the OPTION of using the managed extensions. If you don't care to use the .NET framework you can write platform-dependent apps which may run somewhat faster than the managed code produced by VB and C#. On the other hand it's a very hard to learn if you're new to programming. I have written some Windows NT security utilities in C++ in the past and if you don't know the language, teaching it to yourself is sort of like trying to give yourself cancer.

    C# .NET has a couple of advantages over VB .NET, none over C++ that I can name. It has all the alien structure and syntax of C/C++, but only produces managed code (requires the .NET framework to run) whereas C++ .NET can do either. The only advantage C# has over VB .NET that I can think of is that C# deals with pointers "better" than VB, but I don't understand the difference well enough to explain why. C# is also very hard to learn if you're new to programming.

    VB .NET is, by contrast, pretty damn easy to learn in my opinion, and the library of examples of free code in VB .NET is growing constantly. Many people agree that VB is far easier to learn "how" to program with than a C variant. Later on you can pick up C/C++ with a lot less pain than learning it from scratch.

  4. #4
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    C++ applications sometimes have vatal and vague errors that in some cases can't be traced.I mean dealing with pointers and memory allocations and that stuff that one can hardly understand

  5. #5

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    If VB.net can do everything that VB can do and more then I think I'll stick with that.

    What do I need to start programming? I have VB6 but I don't think that will work. What software do I need? Don't tell me, I already know. . . I need books and books and reading material to learn this language. I have a VB6 book I am reading now. Is VB.net close enouph to VB6 that I should read this?

  6. #6
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403
    If you have absolutely no prior experience, I would recommend C# -- this is just my 2 cents, but learning VB and then moving to VB.NET would be very frustrating, simply because they're just different enough to frustrate you. the VB syntax is much more verbose than that of C++ / C#, which is partly the reason i prefer it.
    For example:
    Code:
    ' VB / VB.NET:
    Dim myVariable as Integer;
    ' C++ / C#
    int myVariable;
    Keep in mind I'm not saying C# and C++ are the same, only that their syntax is similar.
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  7. #7
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    you need some basics , such as variables and what are they ?
    Declarations types , Controls , event , Subs, Functions , and so
    Programming is a matter of time and practice

  8. #8
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Go with C#....Once you have a good handle of the basic syntax, reading and converting .NET code from one language to the next is fairly simple. The real fun is learning the various .NET libs and what that have to offer.

    Also, hands down, Mastering C# is the best book published to date on the C# language.
    Last edited by Lethal; Dec 24th, 2002 at 11:42 AM.

  9. #9

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    Letal, that is a funny avatar. I have been trying to study C++ from the C++ for dummies book and I am finding that either I am a dummy or the book is not written very well.

    If C# is not as good as C++ ??? then I probably won't want to waste my time. I will wait for your opinion.

    Also, speaking of C# what does this mean "but only produces managed code (requires the .NET framework to run) whereas C++ .NET can do either."?

    Remember, I am new to programming. On one hand I want to study a powerful language and on the other, something that I can learn on my own.

  10. #10
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403
    That's the advantage of learning C# -- because the basic syntax is very similiar to that of C++, you will have a headstart on learning a more advanced language. In addition, most of the concepts, with a few notable exceptions (eg templates), that are used in C++ are available in C# / .NET - classes, inheritance, overloading, etc.
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  11. #11
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Don't worry, C# has plenty muscle to work with. When you write C# code, you are writting code that executes within the clr environment, aka 'Managed Code'. It is also possible to write 'unsafe code' in C#.

    In unsafe code or in other words unmanaged code it is possible to declare and use pointers. If we want to write code that interfaces with the operating system, or want to access memory mapped device or want to implement a time critical algorithm then the use of pointer can give lots of advantages. However, in all the books I've read on unmanaged code, it's been said that it is rarely used in real-world applications.

    Hope this helps...

  12. #12

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    (requires the .NET framework to run) - what does that mean? Is this a totally online language? I hope not.

  13. #13

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    One more question. . . I hope.

    If I chose VB.net or C#.net what programs do I need to start building visual programs?

  14. #14
    PowerPoster sunburnt's Avatar
    Join Date
    Feb 2001
    Location
    Boulder, Colorado
    Posts
    1,403
    You can shell out a lot of cash for Visual Studio .NET, or you can download the Runtimes and choose a different IDE. There are quite a few available, but I don't know where to find them off the top of my head. Someone else should be able to point you in the right direction.
    Every passing hour brings the Solar System forty-three thousand miles closer to Globular Cluster M13 in Hercules -- and still there are some misfits who insist that there is no such thing as progress.

  15. #15

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    What is this about the .net framework is required to be installed for someone to run a .net application.

    Are they saying that if I make a little program using C#.net that they will need .net framework to use my program?

  16. #16
    Hyperactive Member
    Join Date
    Feb 2002
    Posts
    261
    Originally posted by aewarnick
    What is this about the .net framework is required to be installed for someone to run a .net application.

    Are they saying that if I make a little program using C#.net that they will need .net framework to use my program?
    http://www.microsoft.com/net/basics/

    This site should answer some of your questions.

    EDIT:

    This one might be better:
    http://msdn.microsoft.com/netframewo...ew/default.asp

  17. #17

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    Maybe I have a brain cramp, I couln't find anything on the subject. I did find that there are compilers for almost any language.

  18. #18
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    What is this about the .net framework is required to be installed for someone to run a .net application.
    You guessed it!
    Don't worry, it's not as bad as it sounds. Future MS OS's will have the framework built directly into the os, but for now, your clients must have the framework installed on their computers in order to run a .NET application. Imaging trying to use all the various windows api's without the dll's, your app would simply puke all over the keyboard. I would suggest either reading up on the web about .NET or getting you a good beginners book.

    Good Luck,
    I'm sure you'll have a blast with your new toy!

  19. #19
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    The .NET framework is a core set of objects that get used in all or most of the different .NET languages. Right now its about 21MB worth of stuff and yes every computer that will run your applications will need to have the framework installed.

    I think that either VB.NET or C# would be good languages to learn. They aren't really much different other than syntax. If you would like to eventually learn C++ then I'd say start with C# but I think that C# or VB.NET is going to have more than enough power for whatever you decide to make. The only reason I say C# if you will move to C++ later is because of the similiar syntax, but also the syntax is part of what makes it hard for beginners to learn. Where VB.NET is more wordy but it is also closer to human language and thus can be easier for beginners to understand.

    As a general rule I think you should learn as many languages as you can, at least to some degree. So more than likely you'll end up learning both VB.NET and C# especially since its easier to find examples if you know both.
    Last edited by Edneeis; Dec 24th, 2002 at 05:46 PM.

  20. #20
    Your Ad Here! Edneeis's Avatar
    Join Date
    Feb 2000
    Location
    Moreno Valley, CA (SoCal)
    Posts
    7,339
    As far as what you need to write programs: The framework has a command line compilier but then you'd have to use Notepad or something to write the code. Since you are learning this is not a good idea. The best bet for Tools or an IDE to program from is either a free one, which may be a little harder to learn with but is free, http://www.icsharpcode.net/OpenSource/SD/default.asp or the standard by MS, Visual Studio.NET (or part thereof) which would probably be the easiest to learn from but is costly http://www.amazon.com/exec/obidos/tg...tware&n=507846. Or instead of the whole Visual Studio which has four languages (C++,C#,VB,J#) you can get a slim version with just the language you want to learn: (VB) http://www.amazon.com/exec/obidos/tg...nce&s=software or (C#) http://www.amazon.com/exec/obidos/AS...611750-0868631

  21. #21
    PowerPoster Lethal's Avatar
    Join Date
    Oct 2000
    Location
    Ohio
    Posts
    2,496
    Not to mention that you will inadvertanly learn the basic C# language syntax by just reading and looking over the mounds of documention that msdn provides (majority of code examples are in C#). I agree with Edneeis, just try to learn them both and you shouldn't have any problems..

  22. #22
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Listen to the two wise men above....

    I just want to add, I can find a lot more examples in C# than I have been able to in VB.Net. Maybe I am just more tuned into finding C# code, so I do, but that is how I see it.

  23. #23

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    I think I am getting a hold on C++ right now. It doesn't seem too hard.

    Do you know any great books for beginner programmers wanting to learn C#? I know that Lethal mentioned mastering C#. But what about free online documentation.

    I think I just discoverd another problem: Do I need WinXP for this?
    Last edited by aewarnick; Dec 24th, 2002 at 09:24 PM.

  24. #24
    Lively Member sandin's Avatar
    Join Date
    Nov 2001
    Location
    From Your Heart!!!!
    Posts
    68

    i think

    hi,

    i think the language is not the main thinking if ur logic is good ,,
    but prefer C# becoz it some how challanging!!

  25. #25

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    hellswraith, I found the following mistake on your site:

    an you can download all the full size images straight to your hard drive.

  26. #26

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    Please don't forget my questions above and when I started the program that you suggested to me I get this error:

    required .dll file, mscoree.dll, was not found. I have the feeling that I need winXP. What do you think? Can I get XP professional somewhere pretty cheap?

  27. #27
    Addicted Member
    Join Date
    Jul 1999
    Posts
    207
    Do you have the framework installed? I think that the file you mentioned is part of the .net framework. I also believe that the free IDE's are built in c# so they would require the framework inorder to run.

    You can either download it or do a windows update but you shouldn't need windows xp.

    Just a thought.

    jeremy

  28. #28
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Originally posted by aewarnick
    hellswraith, I found the following mistake on your site:

    an you can download all the full size images straight to your hard drive.
    Thanks, it has been fixed.

  29. #29
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    interesting
    Why C-Sharp?

    When people talk of computer programming languages, there is always a debate on which one is better. C++, Java, Perl, PHP3… the arguments and counter-points can be endless. However, it is our considered belief that that C# would be in a sense better than the rest. And there is a reason for this.

    Normally, whenever a new product is introduced, it betters the technologies of its ilk. For existing technologies evolve with their own pros and cons. Therefore, in 1995, when Sun introduced Java, it took the best from amongst all languages and added current technology. Now Microsoft has done the same. Its taken the best features from C++ and Java and morphed them into this new programming language called C#.

    Imagine those who worked on Java when it was launched six years ago. Today a CV boasting of a six-year experience in Java means the maximum possible. Simple arithmetic - Java was launched only in '95. Similarly, if you get into C# today, only a Microsoft engineer could have more working knowledge of it! Therefore, we don't think we need to elaborate further on the weight that a CV with C# exposure would command! Think for yourself. You may know of people who have struck lucky in getting a job. But when it comes to keeping it, Lady Luck is powerless.

    Indeed, technology is ruthless, in that, it breaks across all age and seniority barriers. That's the reason why even a teenager could have as much experience with a new technology as a 40-year-old. Unfair, but true.

    by Vijay Mukhi

    on the other hand , if you want to read about VB then click here

    better you read , think and then decide.

  30. #30
    New Member
    Join Date
    Dec 2002
    Location
    USA
    Posts
    10
    It depends where you are at (in terms of knowledge and timeline). If you're a student with little to no programming knowledge/background, then I'd shoot for C#. If you're a long time VB programmer, then it would make sense to jump to VB .NET

  31. #31
    PowerPoster hellswraith's Avatar
    Join Date
    Jul 2002
    Location
    Washington St.
    Posts
    2,464
    Originally posted by VBGOD
    It depends where you are at (in terms of knowledge and timeline). If you're a student with little to no programming knowledge/background, then I'd shoot for C#. If you're a long time VB programmer, then it would make sense to jump to VB .NET
    I don't agree with that. I have been using VB6 for 3+ years, and I was very comfortable with it. When .Net came, I choose to learn C# instead of sticking with VB.Net. I think I spent, at most, a week longer in learning, and that was syntax and such. All the rest of the learning was learning the framework, which it doesn't matter which language you are using, you have to learn it anyway. The cool thing was, I was able to EASILY switch back to vb.net since I already understood the framework, and most of the syntax.

    I think that VB6 users should go ahead and start off with C#. This at least will get them comfortable with it. Then, once they know the framework, they can easily switch back and forth. That, to me, is what is going to make a successful .Net developer; the ability to easily switch between the two languages. You can utilize examples no matter which it was written in.

  32. #32
    Sleep mode
    Join Date
    Aug 2002
    Location
    RUH
    Posts
    8,083
    VB supporters ,seems very old though
    http://www.developer.com/net/vb/article.php/1539241

  33. #33
    Hyperactive Member made_of_asp's Avatar
    Join Date
    Jul 2001
    Location
    123 Fake Street
    Posts
    394
    I prefer C++ over C#. C# is great for database applications and simple stuff - but even my C# IDE (written in C#) runs slow. So, use C# for the tasks you would use VB 6.0 or VB.NET and C++ for true tasks.

    Just my 2 c
    VS.NET 2003

    Need to email me?

  34. #34

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    I am starting to like C++. I am reading this book right now that does not explain everything. So, I am confused about this:

    int sumSequence(void)
    {
    // loop forever
    int accumulator = 0;
    for(;;)
    {
    // fetch another number
    int value = 0;
    cout << "Enter next number: ";
    cin >> value;

    // if it's negative...
    if (value < 0)
    {
    // ...then exit from the loop
    break;
    }

    // ...otherwise add the number to the
    // accumulator
    accumulator= accumulator+ value;
    }// break goes here

    // return the accumulated value
    return accumulator;
    }

    int main(int arg, char* pszArgs[])
    {
    cout << "This program sums multiple series\n"
    << "of numbers. Terminate each sequence\n"
    << "by entering a negative number.\n"
    << "Terminate the series by entering two\n"
    << "negative numbers in a row\n";

    // accumulate sequences of numbers...
    int accumulatedValue;
    do
    {
    // sum a sequence of numbers entered from
    // the keyboard
    cout << "\nEnter next sequence\n";
    accumulatedValue = sumSequence();

    // now output the accumulated result
    cout << "\nThe total is "
    << accumulatedValue
    << "\n";

    // ...until the sum returned is 0
    } while (accumulatedValue != 0);
    cout << "Program terminating\n";
    return 0;
    }


    I ran this little program and found that int main showed up first. But before main finished it jumps up to the beginning and then back down below main. Here:

    cout << "\nThe total is "
    << accumulatedValue
    << "\n";

    Why?
    Last edited by aewarnick; Dec 26th, 2002 at 12:02 PM.

  35. #35

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    Please help. I am a confused little boy!

  36. #36
    Banished Cander's Avatar
    Join Date
    Dec 2000
    Location
    Why do you care?
    Posts
    6,913
    Wrong forum to ask C++ questions.
    Stack Overflow
    See the features of Visual Studio 2010 and C# 4.0: The 10-4 show on Channel9

  37. #37

    Thread Starter
    Frenzied Member aewarnick's Avatar
    Join Date
    Dec 2002
    Posts
    1,037
    Oh, Your right. I'll cut and paste.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width