PDA

View Full Version : VB.NET AND C#



SUJU
11-30-2004, 02:33 AM
Hi

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

THANX

XL-Dennis
11-30-2004, 12:28 PM
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

Paleo
01-31-2005, 02:31 PM
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!

Howard Kaikow
02-13-2005, 05:54 AM
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.

Paleo
02-13-2005, 04:47 PM
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.

XL-Dennis
02-13-2005, 05:19 PM
Hi guys,

The following article shows some major difference between VB.NET & C#:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto2003_ta/html/OffCSharp.asp

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



You simply must use the one you feel better adapted.


I agree on that one.


Kind regards,
Dennis

Howard Kaikow
02-14-2005, 06:36 PM
Hi guys,

The following article shows some major difference between VB.NET & C#:
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/odc_vsto2003_ta/html/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#

Paleo
02-14-2005, 08:29 PM
Hi Howard,


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

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.

EdCompSci
03-26-2006, 10:16 PM
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 (http://www.webopedia.com/TERM/F/class.html) that compose the .NET Framework (http://www.webopedia.com/TERM/F/dot_NET_Framework.html). The services provided by the FCL include runtime (http://www.webopedia.com/TERM/F/runtime.html) core functionality (basic types and collections, file and network (http://www.webopedia.com/TERM/F/FCL.html#) I/O (http://www.webopedia.com/TERM/F/I_O.html), accessing system services, etc.), interaction with databases (http://www.webopedia.com/TERM/F/database.html), consuming and producing XML (http://www.webopedia.com/TERM/F/XML.html), and support (http://www.webopedia.com/TERM/F/FCL.html#) for building Web-based (http://www.webopedia.com/TERM/F/FCL.html#) and desktop-based client applications, and SOAP (http://www.webopedia.com/TERM/F/SOAP.html)-based XML (http://www.webopedia.com/TERM/F/FCL.html#) Web services (http://www.webopedia.com/TERM/F/Web_services.html).
and:

A system (http://www.webopedia.com/TERM/l/system.html) for communicating. Written languages use symbols (that is, characters (http://www.webopedia.com/TERM/l/character.html)) 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 (http://www.webopedia.com/TERM/l/syntax.html) and grammar. The actual meaning of words and combinations of words is defined by the language's semantics (http://www.webopedia.com/TERM/l/semantics.html). In computer science (http://www.webopedia.com/TERM/l/computer_science.html), human languages are known as natural languages (http://www.webopedia.com/TERM/l/natural_language.html). Unfortunately, computers (http://www.webopedia.com/TERM/l/computer.html) are not sophisticated enough to understand natural languages (http://www.webopedia.com/TERM/l/natural_language.html). As a result, we must communicate with computers (http://www.webopedia.com/TERM/l/language.html#) using special computer languages (http://www.webopedia.com/TERM/l/language.html#). There are many different classes of computer (http://www.webopedia.com/TERM/l/language.html#) languages, including machine languages (http://www.webopedia.com/TERM/l/machine_language.html), programming languages (http://www.webopedia.com/TERM/l/programming_language.html), and fourth-generation languages (http://www.webopedia.com/TERM/l/fourth_generation_language.html).

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.

Paleo
03-27-2006, 06:44 AM
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.

EdCompSci
03-29-2006, 09:27 PM
Thanks that was educational

lucas
03-31-2006, 02:02 PM
Carlos could you elaborate a little on what you mean by framework please?

Paleo
03-31-2006, 08:10 PM
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 functionalityhttp://msdn.microsoft.com/netframework/art/clrblock.gif

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.http://msdn.microsoft.com/netframework/art/net-basics5.gif

lucas
04-01-2006, 09:12 AM
Thank you Carlos, that puts everything in its place for me. This thread has been very informative.

Paleo
04-01-2006, 12:11 PM
Hi Steve,

you are very welcome!

EdCompSci
04-08-2006, 10:48 PM
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 (http://www.amazon.com/exec/obidos/tg/detail/-/0782129781/qid=1144561610/sr=2-1/ref=pd_bbs_b_2_1/103-1371613-7150226?v=glance&s=books) -- by Ken Getz, Mike Gilbert; and
SQL: The Complete Reference, Second Edition (http://www.amazon.com/exec/obidos/tg/detail/-/0072225599/qid=1144561650/sr=2-1/ref=pd_bbs_b_2_1/103-1371613-7150226?v=glance&s=books) -- by James R Groff,

just to introduce myself.