Total Pageviews

Tuesday, August 7, 2012

what are the features of C#

core C# features that are found in all versions of the language:
• No pointers required! C# programs typically have no need for direct pointer manipulation
(although you are free to drop down to that level if absolutely necessary).
• Automatic memory management through garbage collection. Given this, C# does not support
a
delete keyword.
• Formal syntactic constructs for classes, interfaces, structures, enumerations, and delegates.
• The C++-like ability to overload operators for a custom type, without the complexity (e.g.,
making sure to “return
*this to allow chaining” is not your problem).
• Support for attribute-based programming. This brand of development allows you to annotate
types and their members to further qualify their behavior.
• The ability to build generic types and generic members. Using generics, you are able to build
very efficient and type-safe code that defines numerous “placeholders” specified at the time
you interact with the generic item.
• Support for anonymous methods, which allow you to supply an inline function anywhere a
delegate type is required.
• Numerous simplifications to the delegate/event model, including covariance, contravariance,
and method group conversion.
• The ability to define a single type across multiple code files (or if necessary, as an in-memory
representation) using the
partial keyword.
• Support for strongly typed queries (a la LINQ, or Language Integrated Query) used to interact
with various forms of data
• Support for anonymous types, which allow you to model the “shape” of a type rather than its
behavior
• The ability to extend the functionality of an existing type using extension methods
• Inclusion of a lambda operator (
=>), which even further simplifies working with .NET delegate
types
• A new object initialization syntax, which allows you to set property values at the time of
object creation

No comments:

Post a Comment