The relationship between C # and. Net

Source: Internet
Author: User

What is the difference between C # and. NET?

In addition to what Andrew said, it's worth noting that:

    • . NET isn ' t just a library, but also a runtime for executing applications.
    • The knowledge of C # implies some knowledge of. NET (because the C # object model corresponds to the. NET object model and Y ou can do something interesting in C # just by using. NET libraries). The opposite isn ' t necessarily true as you can with other languages to write. NET applications.

The distinction between a language, a runtime, and a library are more strict in. net/c# than for Example in C + +, where the language specification also includes some basic library functions. The C # specification says only a very little on the environment (basically, that it should contain some, types such as c3/>, but that's more or less all).

C # and. NET relation

The. NET is a framework. What, means is, the. NET platform contains libraries of existing code and architecture from which all applications Utilizing it build from. So rather than pouring a new foundation for every house, you already start off with a solid one, have been perfected an D improved upon over time. In addition to a starting foundation, the framework serves as a sort of toolbox of existing code this saves you from REINV Enting the wheel every time you need certain things.

For instance, WinForms are an established foundation from which to build Windows applications with a rudimentary user inter Face simply by going to file > New project. You would the interface with GDI yourself to generate Windows Forms and user interface if this library of existing cod E was wasn't there to support you.

C # is simply a programming language. One specifically written with. NET on mind. In fact, the most of the. NET Framework was written in C # (if not all of it). It ' s syntax is simply the next progression of the C language, thus transitioning from C + + to C # shouldn ' t be too difficult . It's a paradigm shift with a lot of things, but in least the syntax is often familiar. Any. NET language are usually compatible with other. NET languages. For instance, I could write a-class library in Visual Basic, and you could use this compiled library in your C # program.

Because. NET is a framework, the code of reference in it does not get compiled to your program, rather a reference t The "O Code in the" Framework is "all" and gets compiled. This means-clients running your program must also has the. NET framework, albeit a stripped down version. They don ' t need all the development tools it need so their. NET framework download is a little smaller. Clients running Windows VISTA/7 don ' t need to worry about anything; It ' s included with their OS. Only certain users running XP would even has to worry on downloading the framework, and most programs accurately Detec t the requirement and inform the end user to go download it.

All versions of Visual Studio is simply tools to help you build applications and better utilize the. NET framework. I would never recommend coding in any. NET language without at least the Express (free) edition of Visual Studio. Intellisense alone is worth it. That's said, it's definitely possible to code something in. NET without the Visual Studio IDE. You could open up Notepad right now and write a C # program, compile it with the free compiler, and run it. While Visual Studio are pretty amazing, and uses the new WPF platform to run, and then serve you just as well. Optimized for. NET 4 but works just fine when targeting previous versions of the. NET as well.

Bottom Line:

    • The. NET is a coding framework.
    • C # is a language built to take advantage of. NET. Note:visual Basic is also a. NET language and choosing between C # and VB is simply a matter of preference.
    • Visual Studio is a tool-to-help-you-coding for. NET.

That's how they was all related.

Relationship between C #,. NET, ASP, ASP.

I Understand your confusion, believe me I had 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 WI ll hopefully help clarify "s going on:

    1. C # and C#.net is the same thing ... C #
    2. . NET is, as-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) which means they all start "talking" the same Language an D can therefore interoperate.
    5. The
    6. ASP. portion of the. NET Library used for making Web sites. There is other subsections of ASP. WebForms (the old from making Web pages) or the rapidly maturing MVC library That is worth looking at too.
    7. Forms (Old Tech) or the new WPF (Windows Presentation Foundation) is the technologies you ' d typically with the. NET to Create what 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 and terms has been used as those synonymous, however that's not the case. The easiest-I can think to differentiate the and is:

    • A Library contains many pieces of functionality that is 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'll have the more work cut out for you.
    • A framework however very much sets out how do you'll be working being providing a workflow that for better or worse are hard to Change. This means rapid development/prototyping, but if significant changes is made in the future it could be impossible (or very Time consuming) to implement them.

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

The relationship between C # and. Net

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.