I believe that many people think that they have learned Java and C # At the same time, or that they have learned Java and C # will do so in a few hours. But in reality, people who love Java may feel uncomfortable with C #, and those who love C # Do not like Java very much.
Java designers hate the complexity of C ++, so Java is very concise, GC also makes memory management very convenient, C # is interested in Java GC and virtual machine technology, we hope to integrate Microsoft's major languages. net. Therefore, C # is not simple or even complicated in terms of language.
The two languages have different designs. Java is the compiling and interpreting language, and C # Is the compiling and then compiling and running language. Java is not delegated, and C # is delegated. Java tends to use interfaces to implement delegate functions, while abstract class plays a greater role in C # Than interface.
Java follows the camel naming rules, and C # follows the Pascal naming rules. But now more and more java people are using C #, And the camal naming rules are also brought to C #, which may make C #CodeIncreasingly difficult to read. Why didn't C # follow camel? I don't see any bad naming rules for camal.
Those who run Java to C # and those who run C # to Java should not criticize them with prejudice.
It is best for people who use C # To summarize their own set of subsets, such as abandoning the out and ref keywords and never using structs. The event is not used. all functions of the event are implemented using delegate. If you don't like delegate, You can discard it all and use interfaces Like java. Use fewer interfaces and abstract class as much as possible. Then let the entire team follow the same standards. C # is too big. If everyone uses their own habits, it will bring endless troubles in the future.
C # is designed for production efficiency, and the Java half is designed for geek.
C # and Java play a role in their respective fields. In the near future, no one will replace anyone.
It is better to understand computer programming from C.