Sponsored Ad

Friday, October 30, 2009

How C# is different from Java

C# absent in Java

  • C # includes the most primitive types and functionality to detect arithmetic exceptions.
  • Includes a large number of notational conveniences over Java, many of whom, like operator overloading and user-defined sets, already knows the large community of C + + programmers.
  • Event management is a "first-class citizen," is part of the language itself.
  • Allows the definition of "structures" which are similar to classes, but can be allocated on the stack (unlike instances of classes in C # and Java).
  • C # implements properties as part of the language syntax.
  • C # allows switch statements to operate on strings.
  • C # allows anonymous methods providing closure functionality.
  • C # allows iterator that uses co-routines through a functional style yield keyword.
  • C # has support for output parameters, assist in the return of multiple values, a prominent shared by C + + and SQL.
  • C # has the ability to alias namespaces.
  • C # has "Explicit Member Implementation" which allows a class to implement specific methods of an interface, independent of their class methods. This also allows to implement two different interfaces which happen to have a method of the same name. The methods of an interface need not be "public" because they may be made to be accessible only through that interface.
  • C # provides integration with COM.
  • Following the example of C and C + +, C # allows call by reference primitive and reference types.

Java absent in C#

  • Keyword strictfp * Java guarantees the result of floating point operations remain the same on all platforms.
  • Java supports exceptions to better monitor the implementation of error trapping and handling.

0 comments:

Post a Comment

Sponsored Ad

Website Update

Followers