Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Other Discussions
  3. IT & Infrastructure
  4. Where to start out first?

Where to start out first?

Scheduled Pinned Locked Moved IT & Infrastructure
csharpquestionc++javajavascript
17 Posts 4 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • D Domenic Denicola

    That's a matter of choice really. Neither will help you in the .NET world, but C++ is still the dominiant programing language in the non-.NET world. So that'd be good to learn eventually, but won't help you for .NET. VD is really useless, it's a crap programming language anyway (.NET or no), so I wouldn't suggest it. VB.NET and C# are really the same language (remember that CLI thing?), but one looks like VC and one looks like C#. C# is cooloer and slightly more powerful amd I would suggest it. You'll also have a bit of familiarity with the syntax since you know JavaScript. So, I suggest you learn C#, and C++ if you want to (although it's not gonna be used in .NET). Skip all falvors of VB altogether if you can. You won't be missing much.

    -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

    M Offline
    M Offline
    merlin9876
    wrote on last edited by
    #8

    Thanks for all the info! Isn't C# and C++ a lot harder to implement? I thought that's why programmers used VB for applications that don't depend on high optimisation (since it looks a lot simpler and less strict than C++?). Anyway, I'll start checking that out and see. Thanks!

    D 1 Reply Last reply
    0
    • M merlin9876

      Thanks for all the info! Isn't C# and C++ a lot harder to implement? I thought that's why programmers used VB for applications that don't depend on high optimisation (since it looks a lot simpler and less strict than C++?). Anyway, I'll start checking that out and see. Thanks!

      D Offline
      D Offline
      Domenic Denicola
      wrote on last edited by
      #9

      merlin9876 wrote: Thanks for all the info! No problem. It's nice to see someone who's interested for a change :) merlin9876 wrote: Isn't C# and C++ a lot harder to implement? Well, put it this way. In 5th grade, after messing around with HTML and JavaScript for a while, I moved straight into C++ and pretty much mastered the language by 6th grade. From 6th - 7th, I had taken my understanding to the point where I was programming with the DirectX 7 and 8 COM APIs, as well as a some MFC. In 8th grade, I learned C#. I am currently going into 9th grade. I never even heard about VB and VB.NET until I came to CodeProject, actually. I'd seen people using BASIC, but always thought it looked rather, well, basic. So if I can do it in 5th grade, you can too! In general, I think C# is easier than C++, but more powerful (because it's .NET). C++ has some advanced features such as templates, multiple inheritance, pointers, etc. that make it more complex, but also better for programming certain things. VB used to be the language of choice for quick GUI programs, because of how it was set up in the Visual Studio 6 package. Apparently it was a lot easier than MFC, the only other Microsoft package for GUI applications at the time. I wouldn't know, though, because that's the far past by now. With Visual Studio .NET, there is no reason to use VB.NET over C#. It's simply for people who want to use a VB-like language instead of a C++-like language. The GUI development is the same (Windows Forms with the .NET Framework), there's the same Form Designer for each of them, the who IDE is the same. Yes, it is a LOT simpler than C++. VB (notice not VB.NET) is simpler than C#. But if you're going to be working with .NET (highly recommended), you'll be using VB.NET or C# (or Managed C++, but that's a whole 'nother story... not recommended except when you need some unmanaged code to combine with managed code in the same source file), which have almost the same level of simplicity. Plus, C# is a lot better, cooler, more powerful, and I just plain like the sytax better. Tell me now, would you like to do these nice curly bracket thingies: { code here }. Or would you go with something ugly like: Begin code here End ;P Any more questions, I'm happy to help.

      -Domenic

      J 1 Reply Last reply
      0
      • D Domenic Denicola

        merlin9876 wrote: Thanks for all the info! No problem. It's nice to see someone who's interested for a change :) merlin9876 wrote: Isn't C# and C++ a lot harder to implement? Well, put it this way. In 5th grade, after messing around with HTML and JavaScript for a while, I moved straight into C++ and pretty much mastered the language by 6th grade. From 6th - 7th, I had taken my understanding to the point where I was programming with the DirectX 7 and 8 COM APIs, as well as a some MFC. In 8th grade, I learned C#. I am currently going into 9th grade. I never even heard about VB and VB.NET until I came to CodeProject, actually. I'd seen people using BASIC, but always thought it looked rather, well, basic. So if I can do it in 5th grade, you can too! In general, I think C# is easier than C++, but more powerful (because it's .NET). C++ has some advanced features such as templates, multiple inheritance, pointers, etc. that make it more complex, but also better for programming certain things. VB used to be the language of choice for quick GUI programs, because of how it was set up in the Visual Studio 6 package. Apparently it was a lot easier than MFC, the only other Microsoft package for GUI applications at the time. I wouldn't know, though, because that's the far past by now. With Visual Studio .NET, there is no reason to use VB.NET over C#. It's simply for people who want to use a VB-like language instead of a C++-like language. The GUI development is the same (Windows Forms with the .NET Framework), there's the same Form Designer for each of them, the who IDE is the same. Yes, it is a LOT simpler than C++. VB (notice not VB.NET) is simpler than C#. But if you're going to be working with .NET (highly recommended), you'll be using VB.NET or C# (or Managed C++, but that's a whole 'nother story... not recommended except when you need some unmanaged code to combine with managed code in the same source file), which have almost the same level of simplicity. Plus, C# is a lot better, cooler, more powerful, and I just plain like the sytax better. Tell me now, would you like to do these nice curly bracket thingies: { code here }. Or would you go with something ugly like: Begin code here End ;P Any more questions, I'm happy to help.

        -Domenic

        J Offline
        J Offline
        James T Johnson
        wrote on last edited by
        #10

        Domenic [_Geek_n] wrote: Or would you go with something ugly like: Begin code here End That sounds like Pascal or FORTRAN, not VB ;P The large difference is in syntax:

        // C#
        public int Foo(int f)
        {
        System.Console.WriteLine("{0}", f);

        return f;
        }

        ' VB.NET
        Public Function Foo(f as Integer) as Integer
        System.Console.WriteLine("{0}", f)

        Foo = f
        End Function

        James "Java is free - and worth every penny." - Christian Graus

        D 1 Reply Last reply
        0
        • J James T Johnson

          Domenic [_Geek_n] wrote: Or would you go with something ugly like: Begin code here End That sounds like Pascal or FORTRAN, not VB ;P The large difference is in syntax:

          // C#
          public int Foo(int f)
          {
          System.Console.WriteLine("{0}", f);

          return f;
          }

          ' VB.NET
          Public Function Foo(f as Integer) as Integer
          System.Console.WriteLine("{0}", f)

          Foo = f
          End Function

          James "Java is free - and worth every penny." - Christian Graus

          D Offline
          D Offline
          Domenic Denicola
          wrote on last edited by
          #11

          James T. Johnson wrote: hat sounds like Pascal or FORTRAN, not VB Guess so. I suppose I just remembered seeing the "End Function"s and "End If"s and such, and automatically moved VB into the "Begin/End" bin in my mind. However, you must admit that the C# approach just looks better, doesn't it. I suppose that's just me, though. Also much more compact: without spaces, it looks like VB is 94 characters while C# is 66. Now of course I'm not whining about file size, as we all have 80 gig hard drives and such, but just in terms of logical structure and compactness, and fitting the same information into a smaller space with no unreasonable squishing, the C# syntax is the clear winner. Can't forget multi-line comments either.

          -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

          J 1 Reply Last reply
          0
          • D Domenic Denicola

            James T. Johnson wrote: hat sounds like Pascal or FORTRAN, not VB Guess so. I suppose I just remembered seeing the "End Function"s and "End If"s and such, and automatically moved VB into the "Begin/End" bin in my mind. However, you must admit that the C# approach just looks better, doesn't it. I suppose that's just me, though. Also much more compact: without spaces, it looks like VB is 94 characters while C# is 66. Now of course I'm not whining about file size, as we all have 80 gig hard drives and such, but just in terms of logical structure and compactness, and fitting the same information into a smaller space with no unreasonable squishing, the C# syntax is the clear winner. Can't forget multi-line comments either.

            -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

            J Offline
            J Offline
            James T Johnson
            wrote on last edited by
            #12

            Don't get me wrong I prefer C# to VB.NET anyday :) VB.NET does have a couple features that C# doesn't have; but those are special case scenarios. James "Java is free - and worth every penny." - Christian Graus

            D 1 Reply Last reply
            0
            • J James T Johnson

              Don't get me wrong I prefer C# to VB.NET anyday :) VB.NET does have a couple features that C# doesn't have; but those are special case scenarios. James "Java is free - and worth every penny." - Christian Graus

              D Offline
              D Offline
              Domenic Denicola
              wrote on last edited by
              #13

              I'd be interesting in hearing about these, for as you can see, I'm rather uneducated in the whole VB area.

              -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

              J 1 Reply Last reply
              0
              • D Domenic Denicola

                I'd be interesting in hearing about these, for as you can see, I'm rather uneducated in the whole VB area.

                -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

                J Offline
                J Offline
                James T Johnson
                wrote on last edited by
                #14

                The one that will make some C# users jealous is that there is a VB.NET construct to attach a method to an event via the method signature; instead of having to attach it manually in the constructor.

                ' VB.NET
                Public Sub MyButton_OnClick(sender as Object, e as EventArgs) Handles MyButton.Click
                ...
                End Sub

                // C#
                // Constructor
                public MyForm()
                MyButton.Click += new EventHandler(MyButton_OnClick);
                }

                public void MyButton_OnClick(object sender, EventArgs e)
                {
                ...
                }

                Its merely a bit of short hand; but something that could save a bit of typing over time. VB.NET still offers Late-binding; which is currently not possible with C# unless you wish to use Reflection. I'm not positive on the syntax; but if it is VB6 style it is usually done like so

                Public Sub CallFoo(o as Object)
                o.Foo()
                End Sub

                Even though the Object class doesn't have a method Foo you can make a call to it without having to cast it up to the correct type. In traditional ASP this is done all the time because VBScript lacks support for types other than Variant.

                ' VBScript
                Dim o
                set o = Server.CreateObject("MyComponent.Foo")

                o.Foo()

                As I said it is possible to do the same with C#; its just not as straight forward.

                // C#
                public void CallFoo(object o)
                {
                Type t = o.GetType();

                MethodInfo mi = t.GetMethod("Foo");

                if( mi != null )
                mi.Invoke( o, new object [] { } );
                }

                Not nearly as straight forward and it only gets worse if the method is overloaded. James "Java is free - and worth every penny." - Christian Graus

                D 1 Reply Last reply
                0
                • J James T Johnson

                  The one that will make some C# users jealous is that there is a VB.NET construct to attach a method to an event via the method signature; instead of having to attach it manually in the constructor.

                  ' VB.NET
                  Public Sub MyButton_OnClick(sender as Object, e as EventArgs) Handles MyButton.Click
                  ...
                  End Sub

                  // C#
                  // Constructor
                  public MyForm()
                  MyButton.Click += new EventHandler(MyButton_OnClick);
                  }

                  public void MyButton_OnClick(object sender, EventArgs e)
                  {
                  ...
                  }

                  Its merely a bit of short hand; but something that could save a bit of typing over time. VB.NET still offers Late-binding; which is currently not possible with C# unless you wish to use Reflection. I'm not positive on the syntax; but if it is VB6 style it is usually done like so

                  Public Sub CallFoo(o as Object)
                  o.Foo()
                  End Sub

                  Even though the Object class doesn't have a method Foo you can make a call to it without having to cast it up to the correct type. In traditional ASP this is done all the time because VBScript lacks support for types other than Variant.

                  ' VBScript
                  Dim o
                  set o = Server.CreateObject("MyComponent.Foo")

                  o.Foo()

                  As I said it is possible to do the same with C#; its just not as straight forward.

                  // C#
                  public void CallFoo(object o)
                  {
                  Type t = o.GetType();

                  MethodInfo mi = t.GetMethod("Foo");

                  if( mi != null )
                  mi.Invoke( o, new object [] { } );
                  }

                  Not nearly as straight forward and it only gets worse if the method is overloaded. James "Java is free - and worth every penny." - Christian Graus

                  D Offline
                  D Offline
                  Domenic Denicola
                  wrote on last edited by
                  #15

                  Wow! You learn something new every day, it seems. Although I'm curious... why wasn't the C# version of CallFoo (assuming o was really an instance of FooClass):

                  // C#
                  public void CallFoo(object o)
                  {
                  ((FooClass)o).Foo();
                  }

                  ? Still not as convenient, of course. I wonder why they haven't added this to C#, if it was available through .NET in the first place?

                  -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

                  J 1 Reply Last reply
                  0
                  • D Domenic Denicola

                    Wow! You learn something new every day, it seems. Although I'm curious... why wasn't the C# version of CallFoo (assuming o was really an instance of FooClass):

                    // C#
                    public void CallFoo(object o)
                    {
                    ((FooClass)o).Foo();
                    }

                    ? Still not as convenient, of course. I wonder why they haven't added this to C#, if it was available through .NET in the first place?

                    -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

                    J Offline
                    J Offline
                    James T Johnson
                    wrote on last edited by
                    #16

                    Domenic [_Geek_n] wrote: // C# public void CallFoo(object o) { ((FooClass)o).Foo(); } This is early binding ie. at compile time the compiler knows what type to look at to resolve the method call. In the VB.NET and the C# Reflection examples the binding is resolved at run time. In COM this is would be done via the IDispatch interface. James "Java is free - and worth every penny." - Christian Graus

                    D 1 Reply Last reply
                    0
                    • J James T Johnson

                      Domenic [_Geek_n] wrote: // C# public void CallFoo(object o) { ((FooClass)o).Foo(); } This is early binding ie. at compile time the compiler knows what type to look at to resolve the method call. In the VB.NET and the C# Reflection examples the binding is resolved at run time. In COM this is would be done via the IDispatch interface. James "Java is free - and worth every penny." - Christian Graus

                      D Offline
                      D Offline
                      Domenic Denicola
                      wrote on last edited by
                      #17

                      Oh, OK. Makes sense. Thanks.

                      -Domenic Denicola- [CPUA 0x1337] MadHamster Creations "I was born human. But this was an accident of fate - a condition merely of time and place. I believe it's something we have the power to change..."

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups