Future directions for C# and Visual Basic C# と

•
本プレゼンテーション (以下、本書) で提供されている情報は、本書が
発表された時点における Microsoft の見解を述べたものです。市場
ニーズの変化に対応する必要があるため、本書は記載された内容の実
現に関する Microsoft の確約とはみなされないものとします。また本
書に記載された情報の正確さについて、保証するものではありません。
•
本書は情報の提供のみを目的としており、明示または黙示に関わらず、
本書について Microsoft はいかなる保証をするものでもありません。
•
本書に記載されている機能名や用語の日本語訳は、あくまでも暫定的
なものであり、将来変更される可能性があります。
C# 5.0 + VB 11.0
C# 4.0 + VB 10.0
Windows ランタイム + 非同期
ダイナミック + 言語の平等性
C# 3.0 + VB 9.0
統合言語クエリ
C# 2.0 + VB 8.0
ジェネリック
C# 1.0 + VB 7.0
マネージ コード
public async Task<XElement> GetXmlAsync(string url) {
var client = new HttpClient();
var response = await client.GetAsync(url);
var text = response.Content.ReadAsString();
return XElement.Parse(text);
}
public Task<XElement> GetXmlAsync(string url) {
var tcs = new TaskCompletionSource<XElement>();
var client = new HttpClient();
client.GetAsync(url).ContinueWith(task => {
var response = task.Result;
var text = response.Content.ReadAsString();
tcs.SetResult(XElement.Parse(text));
});
return tcs.Task;
}
C# の __FILE__ マクロと __LINE__ マクロ?
public static class Trace
{
public static void WriteLine(string message,
[CallerFilePath] string file = "",
[CallerLineNumber] int line = 0,
[CallerMemberName] string member = "")
{
var s = string.Format("{0}:{1} – {2}: {3}", file, line, member, message);
Console.WriteLine(s);
}
}
void Initialize() {
Trace.WriteLine("Starting services");
...
}
Trace.WriteLine("Starting services", "c:\\sources\\foo.cs", 1123, "Initialize");
C# 5.0 + VB 11.0
C# 4.0 + VB 10.0
Windows ランタイム + 非同期
ダイナミック + 言語の平等性
C# 3.0 + VB 9.0
統合言語クエリ
C# 2.0 + VB 8.0
ジェネリック
C# 1.0 + VB 7.0
マネージ コード
クラス
メタ プログラミング
Foo
パブリック
言語オブジェクト
モデル
読み取り-評価-出力のループ
フィールド
言語内 DSL
X
プライベート
文字列
ソース
ソース
コー
ファイル
ソース
ド コー
ド
コンパイラ
コンパイラ
.NET
ソース コー
アセンブリ
ソース
ド コー
ド
言語サービス
コンパイラ API
コンパイラ
パイプライン
メタデータ
インポート
関連セッション
関連文書および記事
•
[PLAT-203T] Async everywhere: creating
responsive APIs & apps
•
Visual Studio 非同期プログラミング
www.msdn.com/vstudio/async (英語)
•
[TOOL-531T] Using the Windows Runtime from
C# and Visual Basic
•
Visual Studio 11 Developoer Preview の
Visual C# の新機能
http://go.microsoft.com/fwlink/?LinkId=228087 (英語)
•
•
[SAC-804T] Building IIS and ASP.NET apps with
the power of async
•
[TOOL-810T] Async made simple in Windows 8,
with C# and Visual Basic
•
[TOOL-829T] The zen of async: Best practices
for best performance
•
•
Visual Studio 11 Developer Preview の
Visual Basic の 新機能
http://go.microsoft.com/fwlink/?LinkId=228088 (英語)
http://forums.dev.windows.com
http://bldw.in/SessionFeedback