5

Is C# a super set of C (like Objective-C and C++)?

I mean, can I write plain C in C#, just like I can do with the other mentioned languages?

2
  • 1
    C++ is not a strict super-set of C; from wikipedia : "One commonly encountered difference is that C allows implicit conversion from void* to other pointer types, but C++ does not. Another common portability issue is that C++ defines many new keywords, such as new and class, that may be used as identifiers (e.g. variable names) in a C program." Dec 21, 2011 at 8:00

4 Answers 4

7

No you can not wirte C code in C# and it is not a superset of C or any other language. Read introduction about C# here http://msdn.microsoft.com/library/z1zx9t92.aspx

3

No, C# just like the java. and they both is the C style language. but not the super set for C. they cannot support C language directly.

2

No, you can't write ANSI C in C#.

Furthermore, C# is not a superset of C; it's a language of its own with a lot on syntax "roots" from C (just like Java syntax is based on C), but a completely different language.

2

C and C# cannot be compared for subset or superset. C is a different language and c# is a different one.

For some features, you may think so. But it depends upon from what angle you see it.

From language perspective, it is not.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

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