What To Expect With C

80 %
20 %
Information about What To Expect With C
Technology

Published on December 11, 2008

Author: jguadagno

Source: slideshare.net

Description

This is the slide show from The Best of PDC event held in Phoenix. It covers all of the upcoming changes in C# 4.0.

Joseph Guadagno (jguadagno@sevdnug.org) Founder Southeast Valley .NET User Group Twitter: twitter.com/jguadagno

Dynamic lookup Named and optional parameters COM specific interop features Variance Potential features

Dynamic lookup

Named and optional parameters

COM specific interop features

Variance

Potential features

The dynamic type Runtime lookup Dynamic objects Plain objects COM objects

The dynamic type

Runtime lookup

Dynamic objects

Plain objects

COM objects

 

No syntax for class creation Cannot find extension methods Anonymous functions (ie Lamda expressions) cannot appear as arguments.

No syntax for class creation

Cannot find extension methods

Anonymous functions (ie Lamda expressions) cannot appear as arguments.

Named parameters Optional parameters Overload resolution

Named parameters

Optional parameters

Overload resolution

public void PrintMe( string text, int copies, bool collate); PrintMe(text: “ Hello World ”, collate: true, copies: 1 );

public void PrintMe( string text, int copies = 1, bool collate = true ); PrintMe(“ Hello World ” );

A signature is applicable if all its parameters are either optional or have exactly one corresponding argument (by name or position) in the call which is convertible to the parameter type. Betterness rules on conversions are only applied for arguments that are explicitly given – omitted optional arguments are ignored for betterness purposes. If two signatures are equally good, one that does not omit optional parameters is preferred.

A signature is applicable if all its parameters are either optional or have exactly one corresponding argument (by name or position) in the call which is convertible to the parameter type.

Betterness rules on conversions are only applied for arguments that are explicitly given – omitted optional arguments are ignored for betterness purposes.

If two signatures are equally good, one that does not omit optional parameters is preferred.

PrintMe(“ Hello World ” ); public void PrintMe( string text, int copies = 1); public void PrintMe( string text); public void PrintMe( object text);

 

Dynamic import Compiling without PIAs Omitting ref

Dynamic import

Compiling without PIAs

Omitting ref

 

Some COM interfaces are not yet available Indexed properties Default properties NOTE: these will only be used for dynamically typed objects. C# static objects will not support them.

Some COM interfaces are not yet available

Indexed properties

Default properties

NOTE: these will only be used for dynamically typed objects. C# static objects will not support them.

Supported for interface and delegate types “ Statically checked definition-site variance” Value types are always invariant IEnumerable<int> is not IEnumerable<object> Similar to existing rules for arrays ref and out parameters need invariant type

Supported for interface and delegate types

“ Statically checked definition-site variance”

Value types are always invariant

IEnumerable<int> is not IEnumerable<object>

Similar to existing rules for arrays

ref and out parameters need invariant type

 

Source code Source code Source File Source code Source code .NET Assembly Meta-programming Read-Eval-Print Loop Language Object Model DSL Embedding Compiler Compiler Class Field public Foo private string X

 

Visual Studio 2010 and .NET 4.0 Training http://cli.gs/VS2010training The Future of C#, Anders Hejlsberg http://cli.gs/FutureOfC LINQ Farm: Covariance and Contravariance in C# 4.0 http://cli.gs/LinqFarm

Visual Studio 2010 and .NET 4.0 Training

http://cli.gs/VS2010training

The Future of C#, Anders Hejlsberg

http://cli.gs/FutureOfC

LINQ Farm: Covariance and Contravariance in C# 4.0

http://cli.gs/LinqFarm

Joseph Guadagno (jguadagno@sevdnug.org) Founder Southeast Valley .NET User Group

Add a comment

Related presentations

Related pages

dict.cc | expect | Wörterbuch Englisch-Deutsch

... C | D | E | F | G ... http://www.dict.cc/?s=expect Tipps: Doppelklick neben Begriff = Rück-Übersetzung — Neue Wörterbuch-Abfrage: Einfach jetzt ...
Read more

What to Expect When You're Expecting: Pregnancy Plus ...

Get the latest stories from What to Expect in your inbox. SIGN UP. Preconception; Preconception Health; Best Tips on Conceiving; Preparing for Pregnancy;
Read more

Expect - Expect - Home Page

Expect is a tool for automating interactive ... (an improved version of this appeared later as Obfuscated C and Other Mysteries, Chapter 36 ("Expect") ...
Read more

expect - LinuxCommand.org

When ^C is pressed, Expect exits. If "foo" is entered, the user sees "bar". When ~~ is pressed, the Expect interpreter runs ...
Read more

dict.cc Wörterbuch :: to expect :: Deutsch-Englisch ...

... C | D | E | F | G | H | I | J | K | L | M | N | O | P | Q | R | S | T | U | V | W | X | Y | Z . ... to expect sb. to put up with sth. jdm. etw. zumuten ...
Read more

Python: module pexpect

Pexpect is a Python module for spawning child applications and controlling ... require TCL and Expect or require C extensions to be compiled. Pexpect does not
Read more

Expect Examples - Tcl

Built-In Examples edit. Expect comes with a bunch of examples that are indispensable and unique full ... { "C-Kermit>" { send cr ...
Read more

Using Expect Scripts to Automate Tasks » ADMIN Magazine

Expect is a unique scripting language that emulates keystrokes by ... Using Expect Scripts to Automate Tasks. ... The -C flag allows you to define a ...
Read more

Expect - Wikipedia

Expect, an extension to the Tcl scripting language written by Don Libes, is a program to automate interactions with programs that expose a text terminal ...
Read more

Expect - definition of expect by The Free Dictionary

Define expect. expect synonyms, expect pronunciation, ... yes, I expect it is → sì, non ne dubito. c. (require) to expect sth (from sb) → esigere qc ...
Read more