Below are the some common differences between c# and Java
(1)We can do kind of Delegates in Java, but its not as clean as in c#.
(2)Lambdas- Which are way better than anonymous inner classes. (C# has anonymous inner classes, too.)
(3)LINQ (Language Integrated and Query ) implemented with c#
(4)Operator overloading- This feature can be abused, but it is still occasionally useful, especially in libraries and DSLs.
(5)Properties- No need to write getters and setters. Everything looks like a direct field access, even if it isn’t.
(6)Yield CO-Routine capability- This is a powerful and highly useful capability, especially for lazy iterators.
(7)Extension methods- They permit you to “extend” existing classes.
(8)Null coalescing operator that provides a simple syntax for dereferencing a reference and supplying a default if the reference is null. | |