Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

I'm really unclear on the difference between C#, C#.NET and the same for ASP and other '.NET' languages.

From what I understand, .NET is a library/framework of... things. I think they're essentially access to Windows data such as form elements etc, but that doesn't seem to apply for ASP.NET.

In addition, I see people calling themselves '.NET' developers. Does this mean they're fluent in C#, ASP and other languages?

Finally, I never see C# without .NET attached. Is C# tied that closely to .NET as to be unusable without it?

In summary: what exactly does .NET provide? How does it relate to C# and ASP etc? What does 'a .NET developer' mean? And finally, why do you never see C# without .NET?

[As an aside, I realise these are multiple questions, but I think they are very inter-related (or at least that is the impression that browsing Programmers / SO etc has given me)].

share|improve this question

8 Answers 8

up vote 67 down vote accepted

I understand your confusion, believe me I have the same perspective when it comes to the Java world! Anyway I'll attempt to break your questions down and tackle them one by one... as well as add some other points in that will hopefully help clarify what's going on:

  1. C# and C#.NET are the same thing... C#
  2. .NET is, as you say, a library of code that .NET languages can talk to.
  3. .NET languages come in different flavours such as: C#.NET, VB.NET, Managed C++, F#.
  4. .NET languages compile to CIL ([Common Intermediate Language][1]) which means they all start "talking" the same language and can therefore interoperate.
  5. ASP.NET is the portion of the .NET library used for making web sites. There are other subsections of ASP.NET like WebForms (the old way of making web pages) or the rapidly maturing MVC library that are worth looking at too.
  6. Forms (old tech) or the new WPF (Windows Presentation Foundation) are the technologies you'd typically use in .NET to create what you know as traditional desktop applications.

One final thing I'd like to finish on is the difference between library and framework. In recent years these two terms have been used as those synonymous, however that is not the case. The easiest way I can think to differentiate the two is:

  • A library contains many pieces of functionality that you may pick and choose from i.e. using one piece of technology doesn't mean you're locked into the rest. This means freedom, however you will have more work cut out for you.
  • A framework however very much sets out how you will be working be providing a workflow that for better or worse is hard to change. This means rapid development/prototyping, but if significant changes are made in the future it may be impossible (or very time consuming) to implement them.

The project you're working on will depend on which choice you make.

share|improve this answer
1  
+1 I was going to answer...but really would only be repeating what you said. –  Mike Brown Feb 6 '11 at 23:05
    
+1 for first and nice formatted answer! –  Abimaran Kugathasan Feb 7 '11 at 7:08
2  
+1, but one minor niggle on #2 - .NET is not a "library of code," it is a framework (which you correctly define as a "workflow" that defines how your programs are defined and run). The collection of standard libraries published by Microsoft that are available to the .NET languages is the .NET Base Class Library (BCL). –  nlawalker Feb 1 '12 at 20:06
3  
Note that ASP may also be used to refer to classic ASP rather than ASP.NET. –  Brian Jun 12 '12 at 20:11
2  
I disagree with point 1. C# could be used without .NET so C#.NET explicitly states that you use C# with the .NET framework whereas C# does not. In practice though most people assume C# is used with .NET. –  Ian Newson Jun 12 '12 at 21:56

.NET is an application development framework - it contains numerous libraries containing a range of functionality.

C# is a language created for use with .NET. It's not the only .NET-compatible language - other options include VB.NET, F#, Managed C++, IronRuby, and IronPython. You write code in the language of your choice to use the functionality in the .NET framework.

ASP.NET is an extension of .NET that helps you with writing web-based applications and websites. Much of the overall framework is available (or useful, in the case of e.g. WinForms) in this context.

[Classic] ASP is an older web framework, also from Microsoft. Despite the similar names, ASP and ASP.NET are quite different under the hood. One notable difference is that your only language options for ASP are VBScript and JScript. ASP is an older and outdated technology, do not trouble yourself with it.

share|improve this answer

Jon Skeet's book, C# In Depth breaks .NET down rather succinctly. It's often used in connection with

  1. Programming Languages (C#, VB)
  2. The Runtime (CLR) which runs the bytecode those languages are compiled to.
  3. Framework Libraries (Windows Forms/ASP.NET)
share|improve this answer

First off, .Net is a bytecode framework, similar to Java bytecode. .Net however is only BYTECODE. There isn't a ".Net" official language. The two main languages targetting .Net are C# and VB.Net. ASP.Net is an extension to the provided .Net library to enable applications written in C# or VB.Net(or other .Net targetted languages) to work as a website.

Developers who say they know .Net usually mean they know C# or VB.Net, or both, and can easily learn whichever one they don't know(C# and VB.Net are extremely similar languages aside from general syntax)

Lastly, ASP IS NOT the same as ASP.Net. They have huge differences

share|improve this answer
    
So is there a difference between a c# application and a c#.net application? I ask as you've dropped the .net from c#.net in your answer. The .Net developers section was very helpful though. –  Samuel Walker Feb 6 '11 at 22:51
4  
Well, C# is actually only a language, not tied with .Net. BUT all current usage of C# is with .Net, so practically, there is no difference between "C#" and "C#.Net" –  Earlz Feb 6 '11 at 23:23

Since only one answer mentions Mono without going into detail:

Though C# as a language was originally developed at Microsoft as part of .NET Framework, it was later standardised by ECMA, meaning that independent standard-compliant implementations of the language can be developed, and indeed they were. The most prominent of those is Mono.

Mono is an open source implementation of an ECMA standard compliant set of tools compatible with .NET Framework, including a C# compiler and a CLI implementation (Mono Runtime, the equivalent of Microsoft's CLR - the virtual machine of .NET Framework). It's aim is to run .NET applications cross-platform. As of today, it supports C# 4.0 and substantial part of .NET Framework features. In addition to mirroring Microsoft implementation, the Mono team is also making innovations of its own.

So, yes, it's possible and feasible to work in C# without .NET. It's unlikely however that Mono will be able to rival Microsoft's market share and .NET Framework's position, not now, and not in the immediate future.

share|improve this answer

You've got to differentiate between Languages, Frameworks, CLR, Patterns and Programming methods.

ASP.Net uses a completely different programming pattern to Winforms development although they share the same foundation. You can program ASP.net and .Net applications in a variety of languages.

Then there is Mono and the C# language used in the Mono context - probably worth some research.

Have a read of these links: http://en.wikipedia.org/wiki/Common_Language_Runtime http://en.wikipedia.org/wiki/.NET_Framework#Alternative_implementations http://en.wikipedia.org/wiki/File:Overview_of_the_Common_Language_Infrastructure.svg

share|improve this answer
    
"You can program ASP.net and .Net applications in a variety of languages." I'm unsure what you mean byu this. You say that you can write an ASP.net program in a variety of languages. But I thought ASP was the language, and .NET was the framework you add in. –  Samuel Walker Feb 6 '11 at 22:47
    
ASP.net is a framework and I see it as a programming methodology. ASP.net can be coded in any language from this list en.wikipedia.org/wiki/List_of_CLI_languages wheras ASP Class cannot. –  J Child Feb 6 '11 at 22:59
    
ASP is not a language. –  Marcie Feb 8 '11 at 16:32

the other answers do a good job of explaining what each technology, but I think they miss one of the major reasons for confusion. C# and C#.NET are essentially synonymous, however VB.NET and VB are different and ASP and ASP.NET are also different. VB generally refers to VB6 and older, and ASP refers to classic ASP. These technologies were radically redesigned with the release of the .NET framework and rather than come up with new names for products Microsoft appended .NET to pretty much everything, but C# was also new so both names really refer to the same thing.

share|improve this answer

c# is a object oriented language which is used for creating console application whereas ASP.Net is used to create web applications or websites.

share|improve this answer
3  
-1 Wrong and misleading. When you program ASP.NET applications, the real "language" you use is either C# or VB.Net, or in fact any other language that can be compiled to the CLR (en.wikipedia.org/wiki/Common_Language_Runtime). By the way, C# may be used to create way more than just "console" applications (Winforms, Silverlight, XNA games, etc.) –  Jalayn Jun 18 '12 at 12:48

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.