开发者

What is the difference between C & C# on the basis of OOP concepts?

What is the difference between C &开发者_如何学Camp; C# on the basis of OOP concepts?


The difference is in the support of those OOP concepts. C does not support OOP concepts while C# does.


There is no OOP in C.

C++ adds object oriented programming support to C. C# is in a whole different generation of languages. It was build to do OO from the ground up (everything is an object).

So, as dreamlax commented, it's comparing apples and oranges.


You really mean C or C++? C is not OOP language. I guess that is enough difference.


C, as a language itself, doesn't support OO programming concepts. But it does not make using them impossible. If you're determined and have a good reason for using object oriented approach to C programming (instead of, for example C++) you can do it.

Of course you can't achieve many of higher level languages functions without extensive use of preprocessor, which is not a good idea because it may be reinventing the wheel (not very round wheel in most cases), but basic OO concepts like inheritance and polymorphism are achievable in quite simple way by using arrays of function pointers, "base type structs" struct members in "subtype structs" etc.


C use structured programming while c# object oriented.


The C# is a CIL, OOP language designed for Microsoft, C not.


in c# class object is required for calling the function.But in c object is not required for calling the function.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜