Question:
Is C# Superset of of both C++ and C?
anonymous
2006-03-08 00:59:52 UTC
Hello,

I am a begginer level programmer I am currently studying C & OOPs with C++

As C++ is superset of C, Is C# also the superset of Both C++ & C.

If yes then, can I do system & assembly programming in C# just the way I did it in C by including respective header files.

If not then, apart from .net, is the C# not in the family of C-Languages?

Thank You.
Five answers:
natoneutron
2006-03-08 01:51:54 UTC
In C# you do not do inline assembler as C++ allows.



You can write dll very easily to be used as an assembly.



C# is easier than C++ and C.



C is considered and unstructured language while C++ and C# are structured languages.



C# introduced several features that handle a lot of work you'd have to do yourself in C++ and especially C.



You can use the GC, garbage disposal to handle memory management for you in C#. If you ever had to do memory managementin C or C++ you know how time consuming and error prone the can be.



C and C++ use headers where C# have a using to define the namespace of the classes that'll do that brunt work C and C++ has to do themselves such as Structure definitions, etc.



C# has built in exception handling like Java only you are not required to throw e like in Java.



C# offers properties to classes unlike Java. This allows a class designer greater access control without decreasing functionality for a caller to use.



C# work s for stricky win32 to .NET platform targeting.



C# give you the power of C++ or aboubt 95% of it and the ease of VB and in targeting the .NET, you may find C# much easier for more advanced functions and dll calls.



The C# compiler will assign defaults to your variables referrence or pointer = null, and value = 0. In C and C++ if you forget to init something that must be, like when using hooks, it'll compile and throw run time.



C# shelters you from tedious tasks like that and more.



There are great simularities between C# and C++, but C++ is the one with greater horsepower.



C# contains a library than easily lets you go from web to net to desktop and back. You can create a great smart clinet using VWD and C#. So you can create classes that will port from your aps.net to your winforms apps with out re coding for the different platform.



http://www.microsoft.com/Express can answer alot of questions on C#, try it and the C++ Express, free until Nov 6, 2006 and see for yourself.



C# is really a great .NET compiler it seems designed for it. But going into the opsys and targeting a specific platform can be done and it's actually easier than C++ and of C.



MSDN and CodeProject have great referrences for beginners and the community is always great at anwering your questions. There is no such thing as a dumb question, everyone's out there to learn and help one another learn.



It's so needed with how fast things change and how much there is to know. One man is no islanad in development these days.
Rank
2006-03-08 01:03:28 UTC
Visual Basic (VB) is a programming environment from Microsoft in which a programmer uses a graphical user interface to choose and modify preselected sections of code written in the BASIC programming language.



C is a structured, procedural programming language that has been widely used both for operating systems and applications and that has had a wide following in the academic community.



C++ is an object-oriented programming (OOP) language that is viewed by many as the best language for creating large-scale applications. C++ is a superset of the C language.



C# (pronounced "C-sharp") is a new object-oriented programming language from Microsoft, which aims to combine the computing power of C++ with the programming ease of Visual Basic. C# is based on C++ and contains features similar to those of Java
chowen
2016-11-12 01:26:05 UTC
C++ expands upon the c programming language. there is help for the object oriented Programming language extension, and there are different small variations. a number of the variations are for help of OOP, even although you could take earnings of the C++ language advancements without utilising OOP. in basic terms a number of the C++ advancements over C: -C makes use of extra cumbersome remark markers (/* */), whilst C++ makes use of the double forward lessen (//). -Variable scope is yet another progression. In C, you won't be able to get admission to 2 variables of an identical call (interior of sight & international), yet with C++, you could. -function overloading. C would not enable applications to have an identical call. C++ enables this, presented that the parameters are distinctive. this permits a programmer to make a series of methods that are comparable in function, yet require distinctive parameters or forms of parameters. i do no longer think of anybody makes use of a right this moment C compiler for programming anymore, until they are utilising something previous for gaining knowledge of C. it is great to apply a C++ compiler and take earnings of it rather is prolonged applications. in basic terms do no longer use OOP. it rather is basically bloated, sluggish code for lazy human beings.
anonymous
2006-03-08 01:01:17 UTC
nah dont be mislead by that idea c# is NOT a superset, instead its in a way a parallel set to C++ in that its function is similar but more precise in inducing the subject to assembeling the necessary details to your programm.
Mike
2006-03-08 01:03:03 UTC
hope this helps

http://www.developer.com/net/csharp/article.php/3302601


This content was originally posted on Y! Answers, a Q&A website that shut down in 2021.
Loading...