Consulting

Results 1 to 16 of 16

Thread: VB.NET AND C#

  1. #1
    VBAX Regular
    Joined
    Sep 2004
    Location
    Sydney, Australia
    Posts
    34

    VB.NET AND C#

    Hi

    Can anyone tell me the difference between vb.nET AND C#.

    THANX
    Suju


    Land Down-Under... Over the Hill and Farrrr Away.

  2. #2
    VBAX Mentor XL-Dennis's Avatar
    Joined
    May 2004
    Location
    ?stersund, Sweden
    Posts
    499
    Location
    Suju,

    We can easily fill a book about it...

    C# has its roots in C/C++ and OOP (Object Oriented programming) and in general is more complicated to learn & understand then VB.NET.

    VB.NET is based on VB and VBA and is therefore more accessible for VBA-programmers.

    How we setup the code etc differ and the syntax is also different...

    Kind regards,
    Dennis
    Kind regards,
    Dennis

    ExcelKB | .NET & Excel | 2nd edition PED


  3. #3
    Administrator
    VP-Knowledge Base
    VBAX Master
    Joined
    Jan 2005
    Location
    Porto Alegre - RS - Brasil
    Posts
    1,219
    Location
    Hi Suju,

    the main difference is syntax as you can do the same sort of things on both. You just must choose the one you feel better adapted. So if you are used to deal with VBA that is a subset out from VBScript thats a subset out from Visual Basic, you would be better off using VB.NET, which is an improvement from VB 6.0, so a lot more powerfull than VBA and VBScript.

    C#.NET as Ken said, is the upgrade from C/C++. So, if you are used to deal with C/C++, JavaScript, PHP or Java you will be more confortable with C#.NET

    But remember that both are Object Oriented and the power do not reside on the language. It resides on the framework, so if you want to become good at .Net, dont you worry about the language. Study the framework!
    Best Regards,

    Carlos Paleo.

    To every problem there is a solution, even if I dont know it, so this posting is provided "AS IS" with no warranties.

    If Debugging is harder than writing a program and your code is as good as you can possibly make
    it, then by definition you're not smart enough to debug it.




    http://www.mugrs.org

  4. #4
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    The bottom line is that it is far easier to use VB .NET with Office VBA than it is to use C#.

    MSFT even points this out in a few KB articles, don't recall which articles.

  5. #5
    Administrator
    VP-Knowledge Base VBAX Master
    Joined
    Jan 2005
    Location
    Porto Alegre - RS - Brasil
    Posts
    1,219
    Location
    Hi Howard,

    considering you would be using Visual Studio + VSTO in order to use Office and VB.NET or C#.NET I really dont see any difference. Of course, if you are used to VBA the knowledge curve is a lot smaller for VB.NET than for C#.NET thats a lot more similar to Java or C++ while VB.NET is very similar to VBA (sure both were borned from VB). I use both for work and even if I have learned a lot faster VB.NET I must ensure you may do the same things with both. You simply must use the one you feel better adapted.
    Best Regards,

    Carlos Paleo.

    To every problem there is a solution, even if I dont know it, so this posting is provided "AS IS" with no warranties.

    If Debugging is harder than writing a program and your code is as good as you can possibly make
    it, then by definition you're not smart enough to debug it.




    http://www.mugrs.org

  6. #6
    VBAX Mentor XL-Dennis's Avatar
    Joined
    May 2004
    Location
    ?stersund, Sweden
    Posts
    499
    Location
    Hi guys,

    The following article shows some major difference between VB.NET & C#:
    http://msdn.microsoft.com/library/de.../OffCSharp.asp

    Eric Carter's blog may also be of interest:
    http://blogs.msdn.com/eric_carter/ar...15/114079.aspx

    You simply must use the one you feel better adapted.
    I agree on that one.


    Kind regards,
    Dennis
    Kind regards,
    Dennis

    ExcelKB | .NET & Excel | 2nd edition PED


  7. #7
    VBAX Mentor
    Joined
    Sep 2004
    Location
    Nashua, NH, USA
    Posts
    489
    Location
    Quote Originally Posted by XL-Dennis
    Hi guys,

    The following article shows some major difference between VB.NET & C#:
    http://msdn.microsoft.com/library/de.../OffCSharp.asp
    That article has some useful examples of why it is hard to use C# than VB .NET with Office.

    Most folkes programming in VBA are not really "progammers", it will be a lot easier for them to migrate to VB .NET than to C#

  8. #8
    Administrator
    VP-Knowledge Base VBAX Master
    Joined
    Jan 2005
    Location
    Porto Alegre - RS - Brasil
    Posts
    1,219
    Location
    Hi Howard,

    Quote Originally Posted by Howard Kaikow
    it is hard to use C# than VB .NET with Office
    the belief that its harder by using C# is mainly enforced by your affirmation
    Quote Originally Posted by Howard Kaikow
    Most folkes programming in VBA are not really "progammers"
    But I still repeat. The best language is that one you are better used to. Of course for those used to VBA it MUST be VB.NET, BUT you can do the same things using VB.NET or C#.NET and VSTO, its just a syntax issue.
    Best Regards,

    Carlos Paleo.

    To every problem there is a solution, even if I dont know it, so this posting is provided "AS IS" with no warranties.

    If Debugging is harder than writing a program and your code is as good as you can possibly make
    it, then by definition you're not smart enough to debug it.




    http://www.mugrs.org

  9. #9
    re:
    But remember that both are Object Oriented and the power do not reside on the language. It resides on the framework, so if you want to become good at .Net, dont you worry about the language. Study the framework!
    Can you explain this a little?

    I know from Webopedia (looked just now):
    Short for framework class library, the collective name for the thousands of classes that compose the .NET Framework. The services provided by the FCL include runtime core functionality (basic types and collections, file and network I/O, accessing system services, etc.), interaction with databases, consuming and producing XML, and support for building Web-based and desktop-based client applications, and SOAP-based XML Web services.
    and:
    A system for communicating. Written languages use symbols (that is, characters) to build words. The entire set of words is the language's vocabulary. The ways in which the words can be meaningfully combined is defined by the language's syntax and grammar. The actual meaning of words and combinations of words is defined by the language's semantics. In computer science, human languages are known as natural languages. Unfortunately, computers are not sophisticated enough to understand natural languages. As a result, we must communicate with computers using special computer languages. There are many different classes of computer languages, including machine languages, programming languages, and fourth-generation languages.
    So I guess you mean that languages are way more extensive and for R E A L programming knowledge learn a language, but for a job when you just need to get the work done you'll never have time for that so the framework will work just fine.

  10. #10
    Administrator
    VP-Knowledge Base VBAX Master
    Joined
    Jan 2005
    Location
    Porto Alegre - RS - Brasil
    Posts
    1,219
    Location
    Quote Originally Posted by EdCompSci
    So I guess you mean that languages are way more extensive and for R E A L programming knowledge learn a language, but for a job when you just need to get the work done you'll never have time for that so the framework will work just fine.
    Hi EdCompSci,

    actually not exactly that. I mean programming on the .Net world is framework based, period. Everything is about the framework, the programming language is only a small piece in the process as you may choose it freely and will still have the same functionality. The era where the progamming choice was one out of the most important has died. Now you may choose the language freely and will still have the same power.
    Best Regards,

    Carlos Paleo.

    To every problem there is a solution, even if I dont know it, so this posting is provided "AS IS" with no warranties.

    If Debugging is harder than writing a program and your code is as good as you can possibly make
    it, then by definition you're not smart enough to debug it.




    http://www.mugrs.org

  11. #11

    Post Thanks

    Thanks that was educational

  12. #12
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Carlos could you elaborate a little on what you mean by framework please?
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  13. #13
    Administrator
    VP-Knowledge Base VBAX Master
    Joined
    Jan 2005
    Location
    Porto Alegre - RS - Brasil
    Posts
    1,219
    Location
    Hi Steve,

    the .NET Framework is a development and execution environment that allows different programming languages & libraries to work together seamlessly to create Windows-based applications that are easier to build, manage, deploy, and integrate with other networked systems.
    The .NET Framework consists of:
    • The Common Language Runtime (CLR)
      A language-neutral development & execution environment that provides services to help "manage" application execution
    • The Framework Class Libraries (FCL)
      A consistent, object-oriented library of prepackaged functionality


    The .NET Framework provides the basic infrastructure that Windows-based applications need to make Microsoft's .NET vision of connecting information, people, systems, and devices a reality:
    • Support for standard networking protocols & specifications
      The .NET Framework uses standard Internet protocols and specifications like TCP/IP, SOAP, XML, & HTTP to allow a broad range of information, people, systems, and devices to be connected
    • Support for different programming languages
      The .NET Framework supports a variety of different programming languages so developers can pick the language of their choice
    • Support for programming libraries developed in different languages
      The .NET Framework provides a consistent programming model for using prepackaged units of functionality (libraries) which makes application development faster, easier & cheaper
    • Support for different platforms
      The .NET Framework is available for a variety of Windows platforms, which allows people, systems, and devices to be connected using different computing platforms. E.g. People using desktop platforms like Windows XP or device platforms like Windows CE can connect to server systems using Windows Server 2003.
    Best Regards,

    Carlos Paleo.

    To every problem there is a solution, even if I dont know it, so this posting is provided "AS IS" with no warranties.

    If Debugging is harder than writing a program and your code is as good as you can possibly make
    it, then by definition you're not smart enough to debug it.




    http://www.mugrs.org

  14. #14
    Moderator VBAX Wizard lucas's Avatar
    Joined
    Jun 2004
    Location
    Tulsa, Oklahoma
    Posts
    7,323
    Location
    Thank you Carlos, that puts everything in its place for me. This thread has been very informative.
    Steve
    "Nearly all men can stand adversity, but if you want to test a man's character, give him power."
    -Abraham Lincoln

  15. #15
    Administrator
    VP-Knowledge Base VBAX Master
    Joined
    Jan 2005
    Location
    Porto Alegre - RS - Brasil
    Posts
    1,219
    Location
    Hi Steve,

    you are very welcome!
    Best Regards,

    Carlos Paleo.

    To every problem there is a solution, even if I dont know it, so this posting is provided "AS IS" with no warranties.

    If Debugging is harder than writing a program and your code is as good as you can possibly make
    it, then by definition you're not smart enough to debug it.




    http://www.mugrs.org

  16. #16

    Cool Just Adding My Thanks

    Thanks carlos. Hey I just joined this board because a member of the IT dept where I work mentioned that at a minimum I should know VBA and SQL, so I'm reading VBA Developer's Handbook, 2nd Edition -- by Ken Getz, Mike Gilbert; and
    SQL: The Complete Reference, Second Edition -- by James R Groff,

    just to introduce myself.

Posting Permissions

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