Wednesday, April 28, 2004

Delphi and C# comparison

Delphi and C# comparison: "Marc Rohloff posted a pretty nice list copmaring and contrasting Delphi and C#.
Features C# has that Delphi doesn't
  1. foreach
  2. operators using, lock, checked and unchecked
  3. block scoped variables
  4. case statements with strings
  5. assembly internal classes
  6. namespaces can span code units
  7. implicit array dimensioning: int[] a = new int[1,2,3];
  8. ternary operator ( ? : )
  9. can use classes from namespaces without importing the whole namespace
  10. circular references are possible
  11. try..catch..finally
  12. assignment operators ( =, , -=, etc)
  13. multi-file assemblies
  14. You don't need to distribute Borland.Delphi.dll
Features Delphi has that C# doesn't
  1. sub-range types
  2. enums and sets are first-class types
  3. class type support
  4. virtual constructors
  5. virtual class methods
  6. nested procedures
  7. non-default index properties
  8. can defines constant arrays and records
  9. resourcestring s
  10. default parameters
  11. variants
  12. arrays with non-integral subscripts
  13. sets with more than 64 elements
  14. message handlers
  15. unions (variant records)
  16. untyped parameters
  17. const parameters

No comments: