Tutorial by Examples

We can omit the argument in the call if that argument is an Optional Argument Every Optional Argument has its own default value It will take default value if we do not supply the value A default value of a Optional Argument must be a Constant expression. Must be a value type such as enum or s...
Generic interfaces and delegates can have their type parameters marked as covariant or contravariant using the out and in keywords respectively. These declarations are then respected for type conversions, both implicit and explicit, and both compile time and run time. For example, the existing inte...
The ref keyword for callers of methods is now optional when calling into methods supplied by COM interfaces. Given a COM method with the signature void Increment(ref int x); the invocation can now be written as either Increment(0); // no need for "ref" or a place holder variable any m...
A new pseudo-type dynamic is introduced into the C# type system. It is treated as System.Object, but in addition, any member access (method call, field, property, or indexer access, or a delegate invocation) or application of an operator on a value of such type is permitted without any type checking...

Page 1 of 1