LoginSignup
3
3

More than 5 years have passed since last update.

Visual Studio | C# > string > $ > リテラル文字列を挿入文字列として識別します。

Last updated at Posted at 2017-12-20
動作環境
Windows 8.1 Pro (64bit)
Microsoft Visual Studio 2017 Community
Sublime Text 2

関連: Visual Studio | WPF > 非同期処理 > Link: ざっくりマルチスレッド(非同期処理)

Cancellation Token について調べてみる by @TsuyoshiUshio@github さん
を読んでいて知らなかった下記の表記。

Console.WriteLine($"Eternal Loop: {DateTime.Now}");

以下が公式の情報のようだ。

$ (C# リファレンス)
https://docs.microsoft.com/ja-jp/dotnet/csharp/language-reference/tokens/interpolated

関連

所感

$, *, #, ? などの機能は、その定義をしている情報にたどり着きにくい。
言語を定義する人達にはそういう視点を持ってほしい。

「書きやすい」と「読みやすい」のどちらを優先するか。保守などを考えたところ「読みやすい」「情報にたどりつきやすい」実装にしておきたい。

3
3
4

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
3